Group permissions problem-overwriting files

Advertisement

dduane
Joined:
Posts:
2
Location:
Washington, DC, USA

Group permissions problem-overwriting files

I'm trying to have one of my users upload a new version of an existing file to a Red Hat Linux 8.0 server. However, she is unable to overwrite the exsting file. The file isn't owned by her, its owned by someone else. The file has permissions rw-rw-r--. She is in the group that the file has associated with it. She is only able to write to the file if it is owned by her. She is able to write new files to the directory. She just isn't able to overwrite files owned by anoher user, even if she's in the group. If she logs in via a shell, she is able to edit the file without a problem, and the workaround has been for her to save the file from the shell so that she becomes the owner of it, but this is becoming tedious.

Any ideas? Is there a bug in WinSCP that doesn't support/recognize group permissions? The error message we get is:
/path/to/file/name/here: set times: Operation not permitted
Thanks for your help. 8)

Reply with quote E-mail

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Group permissions problem-overwriting files

  1. WinSCP does not even try to recognise any permission, it is the server's job to do.
  2. As my experience is, "set times: Operation not permitted" error occures AFTER the file is uploaded. So I suppose transfer has succeeded. What failed is update of file timestamp to match local file one.
  3. If the previous assumption is correct, as workaround you may turn off "Preserve timestamp" option on copy confirmation dialog.

Reply with quote

darkcities
Joined:
Posts:
1

Groups and Redhat 8

WinScp is an awsome product! Great work

But, I also am having the same issue with groups and run Redhat 8.0 so, I'm wondering if it has to do with redhat. The only way I can scp files is to delete/rename the file(in winscp) then scp the file up and that works for my users. If i find a resolution I will post it

Yes, I read the faq/forums about unchecking perservce timestamp and unchecking set permissions/

Here is a log of the error:
Copying 1 files/directories to remote directory "/var/www/websites/downloads/"
PrTime: No; PrRO: Yes; Rght: rw-r--r--; PrR: No
FnCs: N; TM: M; AscM: *.*htm*; *.txt; *.php*; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
echo "WinSCP: this is begin-of-file" ; scp -r -d -t "/var/www/websites/downloads" ; echo "WinSCP: this is end-of-file:$?"
WinSCP: this is begin-of-file
SCP remote side confirmation (0)
Asking user:
File 'style.css' already exists. Overwrite? ()
File: "C:\Documents and Settings\My Documents\style.css"
Copying "C:\Documents and Settings\My Documents\style.css" to remote directory started.
Ascii transfer mode selected.
C0644 723 style.css
scp: /var/www/websites/downloads/style.css: Permission denied
SCP remote side error (1):
Asking user:
Copying file "C:\Documents and Settings\My Documents\style.css" failed. ("scp: /var/www/websites/downloads/style.css: Permission denied")
E
SCP remote side confirmation (0)
WinSCP: this is end-of-file:1
Thanks,

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Groups and Redhat 8

darkcities wrote:

But, I also am having the same issue with groups and run Redhat 8.0 so, I'm wondering if it has to do with redhat. The only way I can scp files is to delete/rename the file(in winscp) then scp the file up and that works for my users. If i find a resolution I will post it
Sorry, I have no clue for you. If you find anything, please let me know.

Reply with quote

Guest

Re: Groups and Redhat 8

Any resolution on this issue? I have the same problem ...
. Renaming file "intro.txt" to "intro2.txt".
> mv -f "intro.txt" "intro2.txt" ; echo "WinSCP: this is end-of-file:$status"
! mv: rename intro.txt to intro2.txt: Permission denied
< WinSCP: this is end-of-file:1
* (ECommand) Error renaming file 'intro.txt' to 'intro2.txt'.
the same operation with LeapFTP does not have a problem. ie. I can delete/rename/move a file as long as group permissions are set. With WinSCP I can only delete/rename/move a file if I log in as the file's owner, irregardless of permissions.

Rick Stirling

Reply with quote

Advertisement

Alistair Burnside
Guest

False error when not owner

Using SFTP, if NOT owner and NOT in group but file has world write OR NOT owner but in group and file has group write then get error:
Permission denied.
Error code: 3
Error message from server: syserr: Not owner, file: /users/aburnsid/testc (en)
Request code: 9
but file is written OK.
This is using Tru64 Unix 5.1A

Reply with quote

Alistair Burnside
Guest

Last problem fixed - was caused by trying to preserve timestamps

Options > Preferences > Transfer >Uncheck "Common options" - "Preserve timestamp"

This allows writes if not owner but group or world permissions allow.

Reply with quote

domesticat
Guest

Re: Group permissions problem-overwriting files

dduane wrote:

Any ideas? Is there a bug in WinSCP that doesn't support/recognize group permissions?
I'm thinking so, and I don't think it's a RedHat issue. In my case, the server is a debian machine, and my friend and I are running winscp on Win2k and WinXP boxes. We are seeing the same error as everyone else here. Unchecking the 'preserve timestamps' option means that we can transfer the files, but we still get the "copying files to remote side failed" error dialog (even though the transfer actually succeeded).

Chalk that one up on the bug list, I think...

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Group permissions problem-overwriting files

domesticat wrote:

I'm thinking so, and I don't think it's a RedHat issue. In my case, the server is a debian machine, and my friend and I are running winscp on Win2k and WinXP boxes. We are seeing the same error as everyone else here. Unchecking the 'preserve timestamps' option means that we can transfer the files, but we still get the "copying files to remote side failed" error dialog (even though the transfer actually succeeded).

Chalk that one up on the bug list, I think...
Can you post a log file? In my opinion, WinSCP reports back only, what it receives from server. If server sends back an error, when it successfuly uploaded file, what I can do?

Reply with quote

Advertisement

CooLynX
Joined:
Posts:
11
Location:
Latvia

Re: Group permissions problem-overwriting files

martin wrote:

Can you post a log file? In my opinion, WinSCP reports back only, what it receives from server. If server sends back an error, when it successfuly uploaded file, what I can do?
posting a log file will not help remembering last times when there was a log file but no respnonse.

Since this is the, hmm let me think ... 4th time maybe 5th we talk about it, the same old bug introduced in 2.3.x and 3.x versions. I will continue to insist on fixing this bug. A workaround "Options > Preferences > Transfer >Uncheck "Common options" - some checks " is not the solution but disabling some features that do not work in programm.

I still get an error like others here when copying a file to a server with group permissions.

First i get an error:
scp: /usr/local/apache/htdocs//images/someimage.gif: set mode: Operation not permitted

Then WinSCP has to be shut down since it is no more working because of an error.
Unexpected directory listing line '

Note for others: try to do the same operation with an older WinSCP version of 2.x. Your programm after this operation will still be operational. That is the way the programm should work.

To sum it up here are the steps i think the programm should work:
1. copy the file to server and try to set permissions or timestamp by leaving the "workaround checkboxes" in place
2. get an error from server that these operations are not permitted because of permissions or whatever error message
3. after an error get a normal directory listing instead of programm crash or clear list after no commands are working in WinSCP.
4. continue to work with WinSCP like did before

btw, why are you ignoring this bug. is it so hard to make the programm work like it was in previous versions where this was working fine?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Group permissions problem-overwriting files

CooLynX wrote:

btw, why are you ignoring this bug. is it so hard to make the programm work like it was in previous versions where this was working fine?
I do not ignore this. You refer two two problems.

I still believe that I cannot do anything with "Operation not permitted" error reported by the server. If you can think of any solution, tell me. I cannot.

You also report that program crashes after this error. This is what I would like to fix. But I haven't known about this till now! How could I have fixed it? However as I do not have access to any server that behaves like this, it is hard to fix it.

To anyone: Can you provide me an test account of such server?

Also I recommend to everyone to use SFTP instead of SCP as it is much better protocol.

Reply with quote

Advertisement

You can post new topics in this forum