title: Why can't I write to the encfs folder as its owner?
body: <p>I'd like to mount s3fs to an AWS S3 bucket, encrypt the contents in the S3 bucket using encfs and write to the bucket (eg copy a file to the bucket) as ec2-user (ie. not using sudo). I cannot copy a file as the ec2-user and I have to use sudo but this is not desirable. Can anyone please advise what needs to be done so that I can get away without using sudo?</p>
  
  <p>The following commands have been issued:</p>
  
  <pre><code># Create mount points
  $ sudo mkdir /mnt/encfs
  
  $ sudo mkdir /mnt/s3fs
  
  # Mount s3fs
  $ sudo s3fs mybucket /mnt/s3fs -o use_cache=/tmp,allow_other
  
  # Mount encfs. Option 'p' is used (for pre-configured paranoia mode)
  $ sudo encfs /mnt/s3fs /mnt/encfs/
  
  $ sudo chown ec2-user:ec2-user /mnt/encfs
  
  # Create a link from ec2-user home directory
  $ ln -s /mnt/encfs encrypted_folder
  </code></pre>
  
  <p>The current situation:</p>
  
  <pre><code>$ sudo cp plaintext.dat encrypted_folder      &lt;- this works
  $ cp plaintext.dat encrypted_folder           &lt;- this does NOT work
  
  cp: accessing 'encrypted_folder': Permission denied
  </code></pre>
  
  <p>Can anyone please point what I have done wrong here? and what I need to do to make it work so that I have to use sudo? Thanks!!</p>