0

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.

mike
  • 212
  • 3
  • 13

1 Answers1

0

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>
Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448