Find the answer to your Linux question:
Results 1 to 2 of 2
I have an Apache server that I am allowing users to run cgi scripts on within their virtual hosts (and yes, I know that this is a big security No-No). ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    1

    CGI Default Permissions for Uploaded File


    I have an Apache server that I am allowing users to run cgi scripts on within their virtual hosts (and yes, I know that this is a big security No-No). Users create the script, set the permissions to 755 and then upload via WebDAV. The problem I have is that when the script is uploaded, the permissions are set back to 644. Is there a way to keep the permissions set to 755? I have experimented with changing the umask, but this does not seem to work.

  2. #2
    Just Joined!
    Join Date
    Apr 2011
    Posts
    14
    Are you sure you have set the umask for the right users? The umask can be set on a per user basis and it defines the default permissions of a newly created file. If it's Apache that's creating the file then the user is likely www or nobody. Consider your environment and use sound judgment whether making the executable bit in the umask is secure for your uses. It's better to make the umask as strict as possible and chmod as needed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •