Why can't I write the encfs folder as its owner?

I would like to install s3fs to an AWS S3 bucket, encrypt the contents to an S3 bucket with encfs, and write to the bucket (e.g. copy a file to the bucket) as ec2 user (i.e. not use sudo) .I cannot copy the file to as ec2 user and I need to use sudo but this is not desirable. Anyone have any advice on what to do so that I can get away without using sudo?

The following commands were issued:

# 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

      

Current situation:

$ sudo cp plaintext.dat encrypted_folder      <- this works
$ cp plaintext.dat encrypted_folder           <- this does NOT work

cp: accessing 'encrypted_folder': Permission denied

      

Can anyone point out what I did wrong here? and what do I need to do to make it work so that I can use sudo? Thank!!

+3


source to share


1 answer


Just providing an update. To resolve the permission issue when installing encfs, enable the --public switch. This should fix the problem.



+3


source







All Articles