How to make permissions same for new and transfered files and directories.

Advertisement

jeffshead
Joined:
Posts:
5
Location:
US

How to make permissions same for new and transfered files and directories.

Below are the permissions that I want to be set but none of the settings in WinSCP accomplish everything listed below:
    - Newly created directories: 0755
    - Newly created files: 0644
    - Transferred directories: 0755
    - Transferred files: 0644
Below are the permissions that are actually set:
    - Newly created directories: 0755
    - Newly created files: 0664
    - Transferred directories: 0755
    - Transferred files: 0644
Do I have to change a setting on the server or can WinSCP be made to change newly created files to 0644?

Reply with quote

Advertisement

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

Re: How to make permissions same for new and transfered files and directories.

So what is your WinSCP settings for permissions when transferring?
How do you you "newly create the files"?
Note that it might be the server that enforces the 0664 permissions for the new files.

Reply with quote

jeffshead
Joined:
Posts:
5
Location:
US

Re: How to make permissions same for new and transfered files and directories.

For transfers, my WinSCP settings for this session:


martin wrote:

How do you you "newly create the files"?
How I create a new file (right-click menu in WinSCP)

Reply with quote

martin
Site Admin
martin avatar

Re: How to make permissions same for new and transfered files and directories.

And if you upload a local file that does not exist in the remote directory, what permissions does it get with the above transfer settings?

Reply with quote

jeffshead

Re: How to make permissions same for new and transfered files and directories.

If I use WinSCP to upload a file, the file is 0644. If I use WinSCP (right-click create new file) to create a new file, the file is 0664.

Reply with quote

Advertisement

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

Re: How to make permissions same for new and transfered files and directories.

Please attach WinSCP session log file showing an explicit upload of a file that does not exist in the remote folder, and an implicit upload of a file created with New > File.

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

You can post new topics in this forum