OSIAS
Posts: 28
Joined: Wed Oct 29, 2014 2:40 pm

Can't Change Permissions

Sun Nov 09, 2014 2:53 am

So I have been fighting with this all day time to ask for help, on the positive side I can say that I truly understand users, groups & file permissions. I have tested it in many other directories and I can get it working without a problem.

I am attempting to setup a SFTP that can access a usb drive on the other device. To get to this point I used.
apt-get install ntfs-3g = so I can look at NTFS file systems
apt-get install usbmount = so it will auto mount any usb stick or HD I plug in

So usbmount auto mounts the usb stick to the /media directory by the label of the formatted volume, lets just call it.
media/usbstick1

If I try to sudo chmod or chown anything to /media/usbstick1 it doesn't take. Now it doesn't give an error, it acts like it completes it without a problem but if you ls -l the permissions never change.

Best I can find is a that its possible a issue with usbmount and I need to
sudo nano /etc/usbmount/usbmount.conf
Look for FS_MOUNTOPTIONS="" and change it to FS_MOUNTOPTIONS="uid=100,gid=100"
Or to whatever ID # of group I want, I went with 100 and will make every new account I create a -G member of it.

So I reboot and ls -l the dir and still no ownership changes just pi:pi still and no rxw in any other category then owner, thus this didn't fix it for me.

Anyone able to help a brother out? Thanks in advance!

klricks
Posts: 6615
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Can't Change Permissions

Sun Nov 09, 2014 4:57 am

You can't use the chmod or chown on NTFS or FAT disks. They only work on Linux EXTx formatted drives.
If you can try to format your disks ext4 as the NTFS driver is a significant CPU hog.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

OSIAS
Posts: 28
Joined: Wed Oct 29, 2014 2:40 pm

Re: Can't Change Permissions

Sun Nov 09, 2014 5:07 am

So I am screwed your saying?

So how come its pi:pi instead of root:root

I getcha on the whole resource hog, but really no other way to manipulate it? That just seems sort of weird t o be honest. Why does pi even get rights to it then...

klricks
Posts: 6615
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Can't Change Permissions

Sun Nov 09, 2014 5:14 am

OSIAS wrote:So I am screwed your saying?

So how come its pi:pi instead of root:root

I getcha on the whole resource hog, but really no other way to manipulate it? That just seems sort of weird t o be honest. Why does pi even get rights to it then...
No.... permissions of sorts are done with mount or at boot with fstab:
Here is a quick Google:
http://askubuntu.com/questions/105473/s ... cal-drives
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

W. H. Heydt
Posts: 11070
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Can't Change Permissions

Sun Nov 09, 2014 6:17 am

OSIAS wrote:So I have been fighting with this all day time to ask for help, on the positive side I can say that I truly understand users, groups & file permissions. I have tested it in many other directories and I can get it working without a problem.
It's not that you don't understand permissions, it's that Microsoft doesn't.

OSIAS
Posts: 28
Joined: Wed Oct 29, 2014 2:40 pm

Re: Can't Change Permissions

Sun Nov 09, 2014 4:52 pm

Look I am a tech by trade I get administration, it was just a matter of using the cli enough and testing to confirm. That and in the first use of permissions I decided to choose to try and manipulate something I couldn't. Thus making me second guess how this is supposed to work. Spending needles time re-verifying my knowledge.

Either way I am not "screwed" as I put it. I have plenty of storage space to offload the files and re-format it to EXT4. Its just very time consuming to move so much data and then move it back. Its going to take a couple days at least.

Lesson learned, seems to be a lot of them with Linux.

Oh um I am not sure about that whole Microsoft comment, seems to me user, groups & permissions are pretty much the same to me. Granted in some finite details perhaps some differences but to the end user not much. To the Admin yes because he has to CLI everything.

Explain to me how there can not be some sort of lightweight GUI for user, groups and permissions client for raspbian? kuser seems about the closest thing but it doesn't seem to be lightweight imho.

Either way thanks for pointing out the ext4 issue.

W. H. Heydt
Posts: 11070
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Can't Change Permissions

Sun Nov 09, 2014 5:59 pm

OSIAS wrote: Oh um I am not sure about that whole Microsoft comment, seems to me user, groups & permissions are pretty much the same to me. Granted in some finite details perhaps some differences but to the end user not much. To the Admin yes because he has to CLI everything.
Linux is derived (conceptually, at least) from unix. Unix is a multi-user OS. Thus permissions at the user, group, and global levels make sense for controlling file access. Microsoft has--traditionally--written single-user systems. On a single-user system (and especially when the single user is the de facto, if not de jure, superuser), file permissions don't really mean anything.

Hence my comment that MS doesn't understand permissions. They've been consistently omitted from MS written file systems.

The result is that if you mount an MS-designed file system (FAT, NTFS...) on a unix/Linux system, the file permissions have to be kludged externally to the file system.

DirkS
Posts: 10015
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Can't Change Permissions

Sun Nov 09, 2014 6:47 pm

Hence my comment that MS doesn't understand permissions. They've been consistently omitted from MS written file systems.
Euh... when was the last time you had a good look at MS file systems?

W. H. Heydt
Posts: 11070
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Can't Change Permissions

Mon Nov 10, 2014 12:18 am

DirkS wrote:
Hence my comment that MS doesn't understand permissions. They've been consistently omitted from MS written file systems.
Euh... when was the last time you had a good look at MS file systems?
Note the OPs problem with NTFS.

Yeah...MS has some kludges in there for multiple logins for Windows. Yes, MS has some file status flags (system, hidden, etc.), but at the core, MS still thinks one computer, one user and their system designers still think that way, unlike the unix/Linux file systems with a full suite of file permissions baked in from the start.

Return to “General discussion”