Tuesday, 20 August 2013

Can fstab options uid and gid be alphanumeric or must they be numeric?

Can fstab options uid and gid be alphanumeric or must they be numeric?

So I'm learning how to set up a tmpfs in fstab for my www-data user and I
was wondering if I can use the actual user/group name instead if the
numeric ids (personal preference)?
I'm on Debian with ext4, formatted with "msdos" during setup.
It seems to be working, but I'm wondering if this is a Debian-specific
feature or will it work across platforms (I like portability)?
Here's what I've got:
$ vim /etc/fstab
# PHP temporary files.
tmpfs /tmpfs/php-session tmpfs
defaults,size=512M,mode=1700,uid=www-data,gid=www-data,noexec,nodev,nosuid
0 0
tmpfs /tmpfs/php-upload tmpfs
defaults,size=256M,mode=1700,uid=www-data,gid=www-data,noexec,nodev,nosuid
0 0
It's my understanding that noexec,nodev,nosuid overrides defaults.

No comments:

Post a Comment