System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Apache Upload of text document

Carol Clark
Advisor

Apache Upload of text document

I am having a problem with permissions when upload a file to a unix server from apache.

The file created has rw r permissions and I need it to have rw r r.

I have logged in as root and su to user www and when I touch a file it create the correct permissions.

Obviously when using http:// you are not loggin into unix as a user so where is it getting the permsissions from.

Thanks in advance
4 REPLIES
Steven E. Protter
Exalted Contributor

Re: Apache Upload of text document

Shalom,

Check the umask of the user that owns the upload location. apache does not control permissions, user configuration does.

Also, some variance is possible depending on upload methodology. ftp versus sftp for example.

apache does not control final permissions, the user configuration does.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Torsten.
Acclaimed Contributor

Re: Apache Upload of text document

How do you upload? Is it an apache package or cgi script or whatever?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Carol Clark
Advisor

Re: Apache Upload of text document

We are uploading the file using cgi-bin script

The directory we are uploading the file too has full access and the user that owns the directory has a umask of 00
Torsten.
Acclaimed Contributor

Re: Apache Upload of text document

So I think your script will create the file (with permissions) and write into it, so you need to check the settings for the user that owns the script (the user that runs apache) and check what your script really does too.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!