Correcting user/group ownership and permissions for entire drive

asked 2017-03-16 12:34:57 -0500

preambler gravatar image

Let me begin with "I'm ignorant and reckless"

Also, I'm using Fedora 25.

While troubleshooting KVM permissions to a storage pool on a secondary HD, I messed all of my permissions up on all HDDs other than my install drive.

As a last ditch effort, I changed ownership and permissions to all drives under /root/media/dub to dub 777

obviously dub is my user. Opening everything up like that has fixed the KVM problem, but I suspect has also violated the property security for those drives and files.

For secondary storage like these sata drives, what should the default or recommended typical user:group and permissions settings be?

edit retag flag offensive close merge delete


It actually depends on your HDDs content. If they only contain data and the data is only accessed by yourself, set permissions and user:group as the files under your home directory (dub:dub, 644 for regular files and 755 for sub directories)

fcomida gravatar imagefcomida ( 2017-03-16 18:02:08 -0500 )edit

Excellent, that is what I was hoping to hear. The HDDs are purely storage, no programs, processes, or config files live in them. Thank you.

preambler gravatar imagepreambler ( 2017-03-17 06:55:04 -0500 )edit

9101 dub 20 0 1275584 54652 37128 S 2.7 0.2 0:38.27 nautilus
drw-r--r--. 6 dub dub 4096 Mar 14 12:42 Content ---> HDD drw-r--r--. 5 dub dub 4096 Mar 14 10:31 Favorites ---> directory within Content

I can navigate to the Content root level, but when I try to navigate to the Favorites directory in nautilus, it says I don't have the permissions necessary to view the content. Below is a pastebin of what I did and see. -- in the paste, I left out a step where I changed permissions back to 644 on Content after the chown

preambler gravatar imagepreambler ( 2017-03-17 07:21:20 -0500 )edit

Content is a directory, permissions should be 755 (700 if you don't want other users to see the content of your HD)

fcomida gravatar imagefcomida ( 2017-03-17 09:05:17 -0500 )edit

Oh, I see that you explicitly stated that in your first response. Sorry, I didn't catch that. when using chmod - is there a way to designate all files but not folders for the entire HDD, and all folders but not files?

preambler gravatar imagepreambler ( 2017-03-17 10:37:13 -0500 )edit