Using encfs as non-root user (i.e. www-data)

From Fyzix
Revision as of 02:23, 15 September 2015 by Fyzix (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


To secure the lighttpd webroot /var/www

Configure fuse


# Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#mount_max = 1000
# Allow non-root users to specify the 'allow_other' or 'allow_root'
# mount options.

Configure fuse device permissions

Any user can be used.

gpasswd -a username fuse
gpasswd -a www-data fuse
chmod a+rw /dev/fuse
chmod g+rw /dev/fuse
chgrp fuse /dev/fuse

Mount as www-data

su - www-data
cd /var/www
cd ..
encfs -o allow_other /var/encrypted /var/www