Linux
--
Questions
--
Followers
Top Experts
cifs mount with folder permissions?
I would like to mount a windows drive and create folder permission based on the user name.
The folder is a drive named /users and each subfolder is a user name.
On the linux side, I would like each folder to have rwx permission for the user and only rx permission for
other users.
Currently, I do a cifs mount configured in the fstab as follows:
//linuxsystem/users /mounts/users cifs iocharset=utf8,credentials =/root/.ci fscredenti als,noperm ,uid=10004 ,gid=10004 0 0
This mounts the windows systems with all users having rwx on all folders.
No changes are possible with chmod or chown.
How can I fix this?
The folder is a drive named /users and each subfolder is a user name.
On the linux side, I would like each folder to have rwx permission for the user and only rx permission for
other users.
Currently, I do a cifs mount configured in the fstab as follows:
//linuxsystem/users /mounts/users cifs iocharset=utf8,credentials
This mounts the windows systems with all users having rwx on all folders.
No changes are possible with chmod or chown.
How can I fix this?
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
ASKER CERTIFIED SOLUTION
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Try
//linuxsystem/users /mounts/users cifs iocharset=utf8,credentials=/root/.cifscredentials,noperm,uid=10004,gid=10004,file_mode=0775,dir_mode=0775 0 0
it is unix uid and gid
so change uid=0,gid=(?users?),perm=0 750 (users can read files, while httpd cannot)
mount accesses share with credentials from .cifscredentials, and users according to permissions in fstab.
so change uid=0,gid=(?users?),perm=0
mount accesses share with credentials from .cifscredentials, and users according to permissions in fstab.
Thanks. Changes to fstab are not working. They give every
user rw access to every directory. I want each user to only
have rw to their own directory.
How can I fix this?
user rw access to every directory. I want each user to only
have rw to their own directory.
How can I fix this?






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
So each user must give up their password....
You can try changing the file_mode or dir_mode option to 700. Can you provide the output of the permission?
//linuxsystem/users /mounts/users cifs iocharset=utf8,credentials=/root/.cifscredentials,noperm,uid=10004,gid=10004,file_mode=0700,dir_mode=0700 0 0
Linux
--
Questions
--
Followers
Top Experts
Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.