Topic "Group permissions problem-overwriting files"

Author Message
dduane
[View user's profile]

Joined: 2003-04-18
Posts: 2
Location: Washington, DC, USA
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 mesage we get is:
/path/to/file/name/here: set times: Operation not permitted

Thanks for your help. Cool
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
  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.

_________________
Martin Prikryl
darkcities
[View user's profile]

Joined: 2003-04-22
Posts: 1
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:

BEGIN
--------------------------------------------------

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

--------------------------------------------------
END

Thanks,
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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.
_________________
Martin Prikryl
Guest




prikryl wrote:
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.


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
Alistair Burnside

Guest


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
Alistair Burnside

Guest


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

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

Guest


dduane wrote:
Any ideas? Is there a bug in WinSCP that doesn't support/recognize group permissions? The error mesage we get is:
/path/to/file/name/here: set times: Operation not permitted


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...
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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?
_________________
Martin Prikryl
CooLynX
[View user's profile]

Joined: 2003-02-10
Posts: 11
Location: Latvia
prikryl 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?
_________________
who cares anyway
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License