Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

Virtual Hosting ftp permissions

What do ISP's / Hosting companies do?

2:49 am on Mar 4, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 5, 2003
votes: 0

Hi there,
I have a problem with permissions on a virtual hosting webserver :

If "user a" logs in to an ftp account, and uploads files, they are owned by 1200:1200 ( where 1200 is their uid and gid ). The web server can read them, but when the web server creates files ( i.e. from a php script ) they are created as the web server, user/group www-data. Depending on the permissions of the files the webserver creates, the ftp user may or may not be able to edit them. Idealy you could set the webserver to run as GID/UID _per_virtualhost_ , and this feature is coming in apache 2 ( but not stable yet, esp with php). What are the work-arounds for this problem until then?

I plan to use virtual ftp users and can specify an arbitary UID/GID in mysql. ( proftpd + mysql )

I'm really interested in how other ISP's / hosting companies do this..

11:19 am on Mar 5, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 6, 2000
votes: 0

Not sure of a workaround from the server/ISP point of view, but when one of my scripts writes a file I tend to chmod or chown it from within the script immediately after it's written, so that its permissions are set as if I'd uploaded the file.