title: nginx webdav upload file premissions
body: <p>I am using nginx with http webdav module to upload files and delete files to server I am able to upload files successfully and delete but the issue I am facing is that files it uploads does not have execute permissions </p>
  
  <pre><code>-rw-rw-rw- 1 nginx nginx 1583670 Apr 19 17:20 startup.jpg 
  </code></pre>
  
  <p>where as the folder it creates have all the permissions</p>
  
  <pre><code>drwxrwxrwx 2 nginx nginx    4096 Apr 19 16:27 s
  </code></pre>
  
  <p>I tried adding rwx to the nginx config but I get error it works fine with rw but with x it gives error </p>
  
  <pre><code>Apr 19 17:23:20 CDNSTORE nginx[18386]: nginx: [emerg] invalid value "group:rwx" in /etc/nginx/conf.d/webdav.conf:11
  </code></pre>
  
  <p>Following is my nginx config </p>
  
  <pre><code>server {
    listen  80;
    server_name  localhost;
    root /home/webdav/files;
    client_body_temp_path   /home/webdav/tmp;
  
    location / {
      dav_methods  PUT DELETE MKCOL COPY MOVE;
     # dav_ext_methods  PROPFIND OPTIONS;
      create_full_put_path  on;
      dav_access  user:rw group:rwx all:rwx;
      autoindex  on;
      client_max_body_size  1G;   # File size limit for new files
  
      auth_basic  "closed site";
      auth_basic_user_file /home/webdav/.htpasswd;
    }
  }
  </code></pre>
  
  <p>I want the images files to be accessible from url for that need to set <code>-rwxr-xr-x</code> permissions  .
  I dont want to use cron and shell to set permission because I need to create folders and subfolder on the fly and folder needs permission so webdav can delete so looking for a solution that nginx set permission when uploading the file  </p>