Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Whenever I overwrite a file using FTP, the chmod of the file gets reset to 600. What can I do prevent this? I'd like to just set the chmod for the entire directory and never have it change.

share|improve this question

1 Answer 1

What sets the default permissions for an upload in unix is the umask setting. I believe you can changes the defaults for ftp in the server settings (there might be other ways). What ftp server program are you running?

You can also use the ftp umask command, for example:

ftp> umask 077
200 UMASK set to 077
ftp> put foo
local: foo remote: foo
227 Entering Passive Mode (172,16,1,112,144,68)
150 Ok to send data.
226 File receive OK.
ftp> ls
227 Entering Passive Mode (172,16,1,112,71,138)
150 Here comes the directory listing.
-rw-------    1 506      506             0 Jun 10 14:52 foo
226 Directory send OK.
ftp>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.