1

I have ArchLiinux Linux comp001 3.18.7-1-ARCH #1 PREEMPT Wed Feb 11 11:38:34 MST 2015 armv6l GNU/Linux for Arm installed on rPi and here is my /etc/fstab file:

#
# /etc/fstab: static file system information
#
# <file system> <dir>   <type>  <options>   <dump>  <pass>
/dev/mmcblk0p1  /boot       vfat    defaults            0       0
/dev/mmcblk0p3  /mnt/data   vfat    noexec,rw,noatime,user,umask=022        0       2

Partition /dev/mmcblkop3 (microsd card fat32 partition) is mounted on mnt/data with rw options, but if I list /mnt directory, I get:

total 20
 4 drwxr-xr-x  3 root root  4096 Sep 18 13:27 .
 4 drwxr-xr-x 18 root root  4096 Jan  9 11:08 ..
12 drwxr-xr-x  3 root root 12288 Jan  1  1970 data

Why there is not write permission bit set on data?

  • @garethTheRed, Ok, another quemment (question/comment): The files and directories inside data inherit permissions from /etc/fstab umask option, as I understand. Now, data directory is shared across LAN via samba server. I must limit user's operation inside data (from MS Windows client) read. Is this done on linux layer or samba layer? – KernelPanic Feb 12 '15 at 14:21
2

You are confusing the rw option with the umask.

The rw option merely dictates that the partition is not mounted read-only.

The umask option dictates what permission that not set on files and directories. Your current umask of 022 sets the permission bits to 755 which translates to rwxr-xr-x. Change the umask to 000, which should give you 777 or rwxrwxrwx permissions.

More info on umask is available on Wikipedia

0

It looks to me you have write permission as root.

Il you want write permission as pi user (or whoever )

 sudo chown pi /mnt/data
 sudo chmod g+w /mnt/data

The rw option in /etc/fstab allow proper user to write on filesystems. It is however seldom use. I once in a while mount a FS ro (read-only) due to migration or backup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.