Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Revise the ftp upload permissions in 10.2 Internet
For some reason in Mac OS X 10.2, the default file permissions when uploading files via ftp is set to 640. This results in the permission "-rw-r-----". That is, the file can be read and modified by the owner, read by those belonging to its group, but others can't even read it. Naturally, this causes problems when using ftp to upload files to a web server.

In previous systems it defaulted to the more sensible 644, or "-rw-r--r--", which is also the system-wide default. Apparently, ftpd does not follow the system's UMASK setting. To change this for all users on the machine you need to create a file in /etc/ called ftpd.conf. In this file, add one line saying:
  umask all 022
Save the file and restart the ftp server. This will make uploaded files readable by all.
    •    
  • Currently 3.33 / 5
  You rated: 4 / 5 (3 votes cast)
 
[13,933 views]  

Revise the ftp upload permissions in 10.2 | 8 comments | Create New Account
Click here to return to the 'Revise the ftp upload permissions in 10.2' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
use scp -p
Authored by: baba on Sep 23, '02 10:06:44AM

This will preserve permissions however you have them set. Just be sure they're correct to begin with.



[ Reply to This | # ]
use scp -p
Authored by: KenPishna on Sep 23, '02 05:26:55PM

How do you set your default permissions? I do a lot of prepress work and save files to a Windows NT Server over TCP/IP using AFP. I would like the folders I create on the server to default to rw for ALL users. I have searched everywhere but can't seem to get an answer. Any help?
Thanks!



[ Reply to This | # ]
How do you change the system wide settings?
Authored by: stuartbryson on Sep 23, '02 07:43:46PM

?



[ Reply to This | # ]
Revise the ftp upload permissions in 10.2
Authored by: sumitro on Feb 25, '03 07:20:07PM

Hmmm.. I am kinda surprised that /etc/ftpd.conf worked in your case because it won't in my case. I am running Mac OS X Server 10.2.3 (6G30). ( I thought 10.2. uses wu-ftpd and /etc/ftp* files are ignored ...)

I wanted the default permission under a certain "uploadhere" folder to be like this:
files -rw-rw-r--
dirs drwxrwxr-x

I ended up adding these two lines to the file
/Library/FTPServer/Configuration/ftpaccess :

upload /Library/FTPServer/FTPRoot /uploadhere yes username groupname 0664 dirs 0775
upload /Library/FTPServer/FTPRoot /uploadhere/* yes username groupname 0664 dirs 0775

( username and groupname to be replace with the required names valid on individual sites)

Also I did
# kill -1 `cat /var/run/xinetd.pid`

for good measure ( I believe this might not be required but no harm in doing this ).

I am still hoping Apple will one day provide man pages for wu-ftpd .. till then "man ftpaccess" on a linux box keeps me alive ... :-)

Good luck.

[ Reply to This | # ]

Revise the ftp upload permissions in 10.2
Authored by: thepenguin on May 21, '03 04:53:59PM

The frustrating thing is, everytime I edit /Library/FTPServer/Configuration/ftpaccess, it gets overwritten when I restart the ftp service. How can I stop this?



[ Reply to This | # ]
Revise the ftp upload permissions in 10.2
Authored by: g3ski on Feb 18, '04 04:40:38AM

Get Info and delete the file extension......

I ran into this problem also. The original ftpaccess file does not have a file extension. You are probably using a text editor like TextEdit that is creating a .txt file, hence your file that looks like "ftpaccess" is really "ftpaccess.txt". After you edit "ftpaccess", do a Get Info on it, and then get rid of the .txt extension.

---
"I want my two dollars!"



[ Reply to This | # ]
Revise the ftp upload permissions in 10.2
Authored by: Billieh on Jan 16, '04 09:09:56PM

Is there a fix for this in Panther?

Thanks for any help you can provide.

billieh@soniq.org

---
-Meep



[ Reply to This | # ]
Revise the ftp upload permissions in 10.2
Authored by: luflores on Feb 16, '04 10:24:36PM

This works for me. I am running 10.3 lates. make sure you put the 'd' in ftpd.conf

-luis



[ Reply to This | # ]