Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Directory permissions.

Przemek wrote:

I ment if I pressed F7 and then input the directory name and pressed "ok".

Option to specify initial permissions for new directory is on the wishlist. Currently the server assigns some default permissions.
I found also one more problem. If I set upload preferences to e.g. "rw-rw----" and in the window that appears after pressing F5 I uncheck "Set permission" check box then the rights are set regardless the state of the "Set permission" check box to "rw-rw----".

If you uncheck "set permissions", the server assigns default permissions to new files (the same case as with new directories). If you specify other permissions like "rw-rw-rw-" and uncheck "set permissions" on upload confirmation window, the right should be again rw-rw----, as it is probably the default permissions for your server. If that's not true, let me know.

Back to the directory upload problem: When client creates new file/directory with SFTP protocol, it may specify its initial permissions. I have already found that OpenSSH SFTP server does not reflect permissions of new uploaded files specified this way, so I have changed it to set permissions explicitly after the file is completely uploaded and closed. So far I have not noticed that the same problem applies to new-directories as well. I have implemented the workaround already in the same manner as with files. Thanks. If you want I may provide you "fixed" version (contact me on my email address).
Przemek

Re: Directory permissions.

Thank you for quick answer. My comments below the quotes.

martin wrote:

Przemek wrote:

When I created the directory the permissions were "rwxr-xr-x".

That do you mean by "When I created the directory"? If you mean "Create directory" command, note that it is not affected by the "Upload" options.

I ment if I pressed F7 and then input the directory name and pressed "ok".
I found also one more problem. If I set upload preferences to e.g. "rw-rw----" and in the window that appears after pressing F5 I uncheck "Set permission" check box then the rights are set regardless the state of the "Set permission" check box to "rw-rw----".

martin wrote:


I'll also check WinSCP for the problem with the upload.

Note that as a temporary woraround you may set your preferred permissions with "Properties" command after upload.

For me it is ok but there are people that will not take care or forget about that (standard users that always say there is problem with the server) and the problem is that some other people will not have correct access to files and directories.
martin

Re: Directory permissions.

Przemek wrote:

When I created the directory the permissions were "rwxr-xr-x".

That do you mean by "When I created the directory"? If you mean "Create directory" command, note that it is not affected by the "Upload" options.

I'll also check WinSCP for the problem with the upload.

Note that as a temporary woraround you may set your preferred permissions with "Properties" command after upload.
Przemek

Directory permissions.

Hello,

I have a problem with directory permissions. I would like to set the rights to just created directory to "rwxrwx---" but everything what I have done, hasn't made the permissions to requested. Also when I have copied directories they haven't been set with correct permissions.

Here is what I have done:
I have set the checkbox "Set permissions" in "Upload options. I have set there also "rw-" for owner and "rw-" for group and "---" for others. I have set also "Add X to directories" checkbox. When I created the directory the permissions were "rwxr-xr-x". When I copied the directory the permissions were "rwxr-x---". That rights were set using SFTP (v3)protocol. During using SCP protocol when I copied the directory the right were set to "rwxrwx---" (correctly) but when I created the directory then the rights were "rwxr-xr-x" as with SFTP.

My question is: do I make something wrong or is that a problem with winscp (or maybe ssh server)?

Settings:
Redhat linux 9.0 with OpenSSH 3.8p1 (umask set to rwxrwx---)
WinSCP 3.6.1 build 221