Permissions Changing by Themselves, Spooky. [Solved]

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
stripedtomato

Permissions Changing by Themselves, Spooky. [Solved]

Post by stripedtomato »

Happy New Year All!,

I believe I have a good basic understanding of permissions, and know where to change them in the properties box, but I seem to be missing something.

I have a fresh install of Helena. I let the OS setup the / drive itself. After the OS install, I mounted a portable USB HDD and noticed the permissions were not the same.

My home folder permission settings are:
Owner: Tim
Folder Access: Create and delete files
File Access: ---

Group: Tim
Folder Access: Access files
File Access: ---

Others: Tim
Folder Access: Access files
File Access: ---



My USB HDD permission settings are:
Owner: Tim
Folder Access: Create and delete files
File Access: ---

Group: NA
Folder None
File Access: ---

Others: NA
Folder Access: None
File Access: ---


As root, I tried to change the setting on the USB HDD to be the same as my home folder, but as soon as I make an adjustment in any of the drop down boxes, the system automatically puts the previous selection back to what it was, right before my eyes.

I would like to have the permissions be the same on my home folder, as well as my USB HDD so 100% syncing with Unison can take place, which is not happening since Unison cannot change the permission of the USB HDD to match my home folder.

I did put in one of my thumb drives, and it too has the same permission settings as my USB HDD.

What am I missing here? What is the OS trying to tell me?

Am I looking at this backwards? Do I need to change the permissions on my home folder to match that of the USB HDD, or is changing the USB HDD permissions the correct way of thinking?

Why, when I look at the permissions in the properties box does the File access sections only show ---, and not the correct DRWX settings for which ever drive I am viewing the permissions for?

I did not know what the real issue is, so I was not sure how/where to search for the solution. If someone knows what the issue is, please let me know, or provide a helpful link.

Thanks much! <:^)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11425
Joined: Tue Feb 03, 2009 10:27 am

Re: Permissions Changing by Themselves, Spooky.

Post by altair4 »

First, that's the way it was designed to mount. Every external USB drive will mount with you as owner and permissions set read/write to you only.

Second, you can't change ownership or permissions on a FAT32 or NTFS partition from linux because there are no ownership or permission "bits" to set.

However, you can set a mount point with the ownership and permissions you desire in /etc/fstab

Something like this:

UUID=04EE-ABFE /home/tim/usb_hdd_name vfat user,umask=022,utf8,flush,noauto 0 0

So the general procedure is to:

(1) Insert the usb device

(2) Issue a sudo blkid in the terminal to get the correct UUID number

(3) Create a directory in your home directory to mount the usb device: mkdir /home/tim/usb_hdd_name

(4) Add an entry like the one I have above in fstab

(5) unmount the usb drive and remove the device from the system

(6) issue a sudo mount -a in the terminal

(7) Insert the usb device into the system and see if I'm full of hooey :wink:
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
stripedtomato

Permissions Changing by Themselves, Spooky. [Solved]

Post by stripedtomato »

Hello again altair4, I hope you are doing well. :),
First, that's the way it was designed to mount. Every external USB drive will mount with you as owner and permissions set read/write to you only.
I understood that to be for non-root usage, but I thought changing to root would allow me to change permissions, but apparently not.
Second, you can't change ownership or permissions on a FAT32 or NTFS partition from linux because there are no ownership or permission "bits" to set.
I didn't know you couldn't do this with a FAT32 drive, which is what a formatted my USB HDD to. Since FAT32 is a Windows format, and since Windows does have permissions which can be set, I was under the assumption the permissions were changeable under Linux. It seems I was wrong here too.
However, you can set a mount point with the ownership and permissions you desire in /etc/fstab
I did try your suggestion, adding this to my fstab:
UUID=4643-4B28 /home/tim/wd vfat user,umask=022,utf8,flush,noauto 0 0

This did not work either, as I still had the same issues. But because of what you mentioned in your second point, it led me to reformat the USB HDD to EXT3. After doing this and mounting it to the correct folder, everything “just worked” as expected.

This actually turned out to be the best solution, as I have ordered a SheevaPlug computer http://www.plugcomputer.org and will be setting it up with the USB HDD as a NAS/file server, so the file format of the USB HDD will not make a difference. I had just ordered the Sheeva yesterday, so I had not thought what file format I was going to use on the USB HDD when it was going to be attached to the Sheeva. But after reading your second point, the decision was obvious.
(7 )Insert the usb device into the system and see if I'm full of hooey.
Nope, you're not full of hooey (well not this time anyway, lol), just full of useful information as usual!

Thanks once again!
Have a Happy New Year :D
User avatar
Midnighter
Level 6
Level 6
Posts: 1327
Joined: Tue May 22, 2007 1:52 pm
Location: Western Australia

Re: Permissions Changing by Themselves, Spooky. [Solved]

Post by Midnighter »

stripedtomato wrote:
Second, you can't change ownership or permissions on a FAT32 or NTFS partition from linux because there are no ownership or permission "bits" to set.
I didn't know you couldn't do this with a FAT32 drive, which is what a formatted my USB HDD to. Since FAT32 is a Windows format, and since Windows does have permissions which can be set, I was under the assumption the permissions were changeable under Linux. It seems I was wrong here too.

I think you misunderstand something. Windows can set permissions on NTFS only, as it's got permissions built-in, FAT doesn't. There are no permissions in FAt to be set, at all.
altair4
Level 20
Level 20
Posts: 11425
Joined: Tue Feb 03, 2009 10:27 am

Re: Permissions Changing by Themselves, Spooky.

Post by altair4 »

UUID=4643-4B28 /home/tim/wd vfat user,umask=022,utf8,flush,noauto 0 0
That would have produced a mount with the same permissions, 0755, and the same ownership, owner:group = tim:tim as your home folder. I think that's what you asked for. Maybe I misinterpreted your original post.

The only problem with formating an external device in ext3 is compatibility and usability.

Windows and Mac can't access the device ( well, I don't think a Mac can access it ).

Portability is another problem.

When a usb drive is formatted in fat32 or ntfs and inserted into someone else's linux computer it will mount with user:group = user:user. Meaning it will mount with possession passing to whoever is logged into the computer. When a usb drive is formatted in ex3/4 it will mount as user:group = root:root. Easily changed by using a chown -R, but that will have to be done by every person who uses it and by the original owner when he gets it back.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
stripedtomato

Re: Permissions Changing by Themselves, Spooky.

Post by stripedtomato »

Midnighter
I think you misunderstand something. Windows can set permissions on NTFS only, as it's got permissions built-in, FAT doesn't. There are no permissions in FAt to be set, at all.
Interesting, I did not know that. When using Windows 3.1/95/98 I never dealt with permissions. My most current MS OS was Windows XP Pro which is where I was learning about permissions. I assumed permissions were a “normal” part of OS's, for security reasons.

Thanks for the info. Now you have me curious about how Mac's deal with permissions. :)
============================================
altair4
That would have produced a mount with the same permissions, 0755, and the same ownership, owner:group = tim:tim as your home folder. I think that's what you asked for. Maybe I misinterpreted your original post.
It may have been me, not you. The owner:group = tim:tim, is correct. I was trying to set folder access under group to access files, (it was set by the OS as none, but the OS would not let me, because the USB HDD was formatted to FAT32, as you pointed out.

Because of my learning curve, it is seeming like the more I learn, the more I am getting confused, which is why I formatted the USB HDD to EXT3 for ease-ability during my learning period.

Once I have my Sheeva up and running, the OS/permissions/portability issues will not be a factor since the USB HDD will be accessible via the net for anyone I give access to.

So for now, I think I am going to take a setup back and do some more reading about the basics of the Linux file system, it's permissions, and the fstab file. I would like to have a better understanding in these areas.

Can you recommend any net based sites which have good reference or .pdf's in these areas?

Thank you both for your help and teachings.
stripedtomato

Re: Permissions Changing by Themselves, Spooky.

Post by stripedtomato »

Ended up dropping the use of FAT32 & NTFS with the USB HDD. Used an old laptop (not the Sheeva, as it crashed and burned), as an FTP / SSH server with Ext4, which solved the problem.
Locked

Return to “Beginner Questions”