Greetings,
I have been searching far and wide and cannot seem to narrow this one down. I am running Debian Jessie with LXDE, but not booting to LXDE. I have a USB drive connected to my system and autofs configured and all Auto-mount features unchecked in pcmanfm. So if I boot to command line and let autofs mount the USB drive, it mounts as root with permission of 777, just as I have specified in my auto.misc file. However, if I go into LXDE and let autofs mount the drive, it mounts as my user account and permissions of 700. To illustrate, I configured with 2 USB drives and let the first drive mount before loading LXDE and the second I mounted after going into LXDE:
drwxrwxrwx 13 root root 12288 Dec 31 1969 primary
drwx------ 2 grendelos grendelos 4096 Dec 31 1969 secondary
Here is what my auto.misc file has:
primary -fstype=vfat,rw,noatime,nodiratime,user,umask=0 :LABEL=LEXAR_BLUE
secondary -fstype=vfat,rw,noatime,nodiratime,user,umask=0 :LABEL=MC_4GB
So what I can't figure out is how LXDE ties into automount/autofs in order to prevent this from happening. Anyone have any idea?
Issue with autofs and user permission when running LXDE
Re: Issue with autofs and user permission when running LXDE
Just to add a little more info. I tried to see if I could recreate this problem with Debian Jessie and Xfce and was unable to, so the problem does seem specific to LXDE when running. At this point, I am wondering if the auto-mount options I set in pcmanfm are not talking correctly with the gvfs?
Re: Issue with autofs and user permission when running LXDE
I have never found a need for autofs, so cannot say anything useful there. I use fstab (/etc/fstab) to do my mounting. For anyone interested, each line in fstab has 6 fields which identify where and how the partition is to be mounted. For example:
The first field is either the UUID number (as shown) or the "/dev" identifier, /dev/sda1 in this example, which is commented out because the UUID number is being used.
The second field is the mount point which you need to be sure is made and named ahead of time. You can choose any name.
The third field is partition type (ext 4, ext2, ntfs, vfat, etc). Use "vfat" for "fat32".
The fourth field gives the permissions for that partition. Four numbers are used. The first number when set to 0 just identifies that an octal system is being used, which is the same as in the chmod command https://ss64.com/bash/chmod.html. The other are 3 are also based on the chmod command, but in reverse.
So chmod 0777 would be equal to umask=0000 and chmod 0755 would be equal to umask=0022, etc. If you want to make different permissions for directories and files, then you use dmask= ,fmask= instead of umask= .
I don't remember what the 5th and 6th fields do, but putting them to be 0 will always work.
Code: Select all
#/dev/sda1
UUID=66bfd239-6226-433b-98ab-3bd4a7e38c4c /media/me/[label] ext4 user,umask=0000 0 0
The second field is the mount point which you need to be sure is made and named ahead of time. You can choose any name.
The third field is partition type (ext 4, ext2, ntfs, vfat, etc). Use "vfat" for "fat32".
The fourth field gives the permissions for that partition. Four numbers are used. The first number when set to 0 just identifies that an octal system is being used, which is the same as in the chmod command https://ss64.com/bash/chmod.html. The other are 3 are also based on the chmod command, but in reverse.
So chmod 0777 would be equal to umask=0000 and chmod 0755 would be equal to umask=0022, etc. If you want to make different permissions for directories and files, then you use dmask= ,fmask= instead of umask= .
I don't remember what the 5th and 6th fields do, but putting them to be 0 will always work.
Re: Issue with autofs and user permission when running LXDE
I use /etc/fstab also, and for NTFS I have to add the permissions option otherwise I can't set the permissions using chmod on NTFS folders/files
Code: Select all
/dev/sda3 /mnt/sda3 ntfs-3g permissions,locale=en_GB.utf8 0 2