Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forcing UID, GID and permissions on FTP uploaded files.

Status
Not open for further replies.

focks

ISP
Mar 21, 1999
3
US
Is there a way to set the UID, GID, and permissions on any file uploaded to a specific directory (/home/httpd/*) by any user to nobody. every time one is uploaded?
 
Can't think of anything off the top of my head. It sounds like you're allowing users to upload to your web server. Maybe you should upload to a safer directory somewhere else, and have a cron job set up to move and chown/chmod once an hour, or something.<br>
<br>
The only other way I can think is to have users log in to FTP using the desired user. As this is "nobody" in your case, this might not work :(
 
I agree with AndyBo. Uploading to your web-server is very dangerous. Follow the guidelines for establishing an anonomous ftp server and then script the file ownership and permissions. If you figured a way to use a umask 002, the best you could get is 664 which is fine as long as your users aren't uploading scripts to your web server. And if they are, then you have a bigger problem then what you posted:)<br>
<br>
Have a happy...<br>
<br>
war
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top