Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount option mode #4101

Closed
CMCDragonkai opened this issue Dec 14, 2015 · 3 comments
Closed

Mount option mode #4101

CMCDragonkai opened this issue Dec 14, 2015 · 3 comments

Comments

@CMCDragonkai
Copy link

When creating a dataset for /tmp in ZFS, I expected that there would be a mode option to set like mode=1777. Currently ZFS doesn't have this option under zfs mount, but neither does normal mount command:

# this doesn't work
mount -t zfs -o mode=1777 rpool/tmp /mnt/tmp

Any reasons why there's no mode option for ZFS?

@dasjoe
Copy link
Contributor

dasjoe commented Dec 14, 2015

A dataset's permissions are preserved, you can set them manually once and they'll be restored at the next mount:

# zfs create sbooblehat-rpool/test
# ls -al /
[…]
drwxr-xr-x   2 root root        2 Dec 14 14:35 test
[…]
# chmod 1777 /test
# ls -al /
[…]
drwxrwxrwt   2 root root        2 Dec 14 14:35 test
[…]
# zfs umount /test
# rm -r /test
# zfs mount sbooblehat-rpool/test 
# ls -al /
[…]
drwxrwxrwt   2 root root        2 Dec 14 14:35 test
[…]

@CMCDragonkai
Copy link
Author

Oh that's handy. What's storing the state of that?

@behlendorf
Copy link
Contributor

@CMCDragonkai they're stored in the root inode for the dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants