Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I currently mount a folder (/mnt/windowspc) to my windows pc and all is working fine.
However, I am currently trying to lockdown the security on files and folders and have noticed that the mount folder (/mnt/windowspc) has rwxr-xr-x root:root set on it.
When I umount and then run chmod and chown to set it to rwxrwx--- root:mygroup so that root and anyone in mygroup can do what they want, the settings are ok.
However, when I then remount, the settings are reset back to rwxr-xr-x root:root.
Am I doing something wrong / could this be done a different way.
The word "windows" turns my attention to e.g. fat32, which of course does not give you the ability to change permissions. (At least to my limited understanding, as I do not use fat.)
My above comment applies also (or especially) to NTFS.
Chmod and chown should have nothing to do with mounting.
But what is wrong with rwxr-xr-x root:root?
If I understood correctly, you wanted to change the write-settings - but if you are using NTFS you can not write anyhow, that is if you haven't enabled the (experimental) write-mode of NTFS in the kernel.
Generally I would prefer to have settings in the fstab but it is largely a matter of taste and practicalness. You might want to run 'man mount' and try for instance the options 'user' or 'users' to enable ordinary users to mount the file system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.