title: How to change the permission for a s3 bucket mounted folder
body: <p>I have Ubuntu 12.04 EC2 Instance and for my-domain i have a WordPress site.</p>
  
  <p>My S3fs Version</p>
  
  <pre><code>Amazon Simple Storage Service File System 1.74
  Copyright (C) 2010 Randy Rizun &lt;rrizun@gmail.com&gt;
  License GPL2: GNU GPL version 2 &lt;http://gnu.org/licenses/gpl.html&gt;
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.
  </code></pre>
  
  <p>Recently I have created a s3 bucket named <code>mybucket</code> and mounted in EC2 instances in the following path /var/www/my-domain/mybucket with the reference to the link <a href="http://tecadmin.net/mount-s3-bucket-centosrhel-ubuntu-using-s3fs/" rel="nofollow">http://tecadmin.net/mount-s3-bucket-centosrhel-ubuntu-using-s3fs/</a> and mounted permentantly using the /etc/fstab and using following command </p>
  
  <pre><code>s3fs#mybucket /var/www/mydomain/mybucket fuse netdev,use_cache=/tmp/cache,use_rrs=1,allow_other 0 0
  </code></pre>
  
  <p>and while i try the below command to change the ownership</p>
  
  <pre><code>chown myuser:daemon /var/www/my-domain/mybucket
  </code></pre>
  
  <p>I am getting this below error</p>
  
  <pre><code>chown: changing ownership of ‘/var/www/my-domain/mybucket’: Input/output error
  </code></pre>
  
  <p>and also when i upload any contents like images,files etc.. through S3 browser and if check that contents by giving ls -all in the S3 mounted folder in EC2 means i am getting following output</p>
  
  <pre><code>---------- 1 root       root     10 Jan  7 08:33 New Text Document.txt
  </code></pre>
  
  <p>and i have ftp for my domain and when i use the FTP clients like Filezilla to upload the contents to S3 the mounted Folder /var/www/my-domain/mybucket i am getting the following error.</p>
  
  <pre><code>Response:   500 OOPS: ftruncate
  Error:  Critical file transfer error
  Response:   500 OOPS: priv_sock_get_cmd
  Error:  Connection closed by server
  </code></pre>
  
  <p>My questions are</p>
  
  <ol>
  <li>How to change the permissions of the S3 bucket mounted folder in a EC2 instance.</li>
  <li>How to upload the contents to S3 bucket so that it will have normal file permissions.(I perfer to upload using filezilla like a normal folder)</li>
  <li>What will be the URL for the contents of the S3 bucket folder can i use mydomain.com/mybucket or is there any other URL for accessing through web(Apache)</li>
  <li>How to resolve the File zilla 500 OOPS error</li>
  </ol>
  
  <p>Kindly help me to resolve the above issues i am working on this for past 1 week and searched lots of articles nothing helped me .</p>