[SOLVED] Drive permissions

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
pierreluc102

[SOLVED] Drive permissions

Post by pierreluc102 »

Hello,

Everytime I am trying to change the access to a folder, the access revokes back to ---

Or when it stays, it goes back to --- when I apply my changes.

I right click, properties, permissions, and then I am trying to change them there.

Please note, the drive is on NTFS, and NTFS-3G is also installed

also, can anyone tell me why no one is able to access my drive when I share it among windows users?

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

Re: Drive permissions

Post by altair4 »

NTFS has no linux permissions so a chmod or a chown has no affect. The way Linux handles NTFS is to create a view that makes it appear to have linux permissions but ones that cannot be changed. Unless you mount the partition through fstab it will mount in such a way that only you can access it. So you would have to have it mount with permissions allowing others to access the mounted partition.

But, you also posted this:
can anyone tell me why no one is able to access my drive when I share it among windows users?
That implies to me that you are using Samba to share your ntfs folder across your home network. If that's true then there is a simple fix and that is to make all these Windows users appear to be you:

Edit smb.conf as root:

Code: Select all

gksu gedit /etc/samba/smb.conf
Add a line to the [global] section - right under the workgroup line:

Code: Select all

force user = altair
Change altair to your own login user name
Then restart samba:

Code: Select all

sudo service smbd restart
Wait a few minutes before allowing your WIndows users to access the share. When they do they will be converted to you for those shares and will have access to the ntfs folder.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
pierreluc102

Re: Drive permissions

Post by pierreluc102 »

Thank you VERY much Altair,

Although,
NTFS has no linux permissions so a chmod or a chown has no affect. The way Linux handles NTFS is to create a view that makes it appear to have linux permissions but ones that cannot be changed. Unless you mount the partition through fstab it will mount in such a way that only you can access it. So you would have to have it mount with permissions allowing others to access the mounted partition.
Pardon my n00bishness, but how do I mount it with permissions allowing others to access my drive?

indeed chown had absolutely no effects.

Would you recommend formating my data drive to ext3/4? I know I can access those files on my Windows (taking into account my windows is used only for games) through http://www.diskinternals.com/linux-reader/

Here is my partition table

# parted /dev/sda print
Model: ATA WDC WD1002FAEX-0 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 106MB 105MB primary ntfs boot
2 106MB 210GB 210GB primary ntfs
3 210GB 745GB 535GB extended
5 210GB 210GB 499MB logical ext4
6 210GB 235GB 25.0GB logical linux-swap(v1)
7 235GB 245GB 9999MB logical ext4
8 245GB 745GB 500GB logical ext4


sda1 and sda2 are my windows's
sda5 to 8 is my linux's

and this is my data drive

# parted /dev/sdb print
Model: ATA ST31000524AS (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 629GB 629GB primary ntfs
2 629GB 1000GB 371GB primary ntfs

sdb1 is my main data storage
sdb2 is my windows games storage (Steam and stuff)




Thank you in advance for your aknowledgable answers.
altair4
Level 20
Level 20
Posts: 11450
Joined: Tue Feb 03, 2009 10:27 am

Re: Drive permissions

Post by altair4 »

I'm getting confused as to where these Windows users are but to answer your question the general process to mount an ntfs partition with full access is this:

[1] Edit fstab as root:

Code: Select all

gksu gedit /etc/fstab
[2] Add a line at the end for each ntfs partition you want to mount that looks like this:

Code: Select all

UUID=200C11850C1156DE /media/Data1 ntfs defaults,nls=utf8,umask=000,windows_names 0 0
** To find the correct UUID number for your partitions run this command:

Code: Select all

sudo blkid -c /dev/null
[3] If the partition is currently mounted unmount it.

[4] Create a mountpoint for each partition. In this example:

Code: Select all

sudo mkdir /media/Data1
[5] Run the following command to mount the partition with it's new permissions:

Code: Select all

sudo mount -a
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
pierreluc102

Re: Drive permissions

Post by pierreluc102 »

1- The Windows users are on the network! Ohter PCs!

2- I have done everything you mentionned, the line I added is UUID=1635066A21FD2629 /media/pierreluc102/DATA ntfs defaults,nls=utf8,umask=000,windows_names 0 0

at the very bottom, I got the UUID from sudo blkid -c /dev/null

and now, appararently I am not the owner any longer, the owner is now root! Anything I did wrong?

Also, when I go into /media I see pierreluc102 (as my login name) then I see DATA

3- Should I just format everything into EXT4 to save the trouble?

Thanks in advance, you are a very good help to me right now.
altair4
Level 20
Level 20
Posts: 11450
Joined: Tue Feb 03, 2009 10:27 am

Re: Drive permissions

Post by altair4 »

1- The Windows users are on the network! Ohter PCs!
The "force user" in smb.conf was the easiest solution.
and now, appararently I am not the owner any longer, the owner is now root! Anything I did wrong?
It's true that root is the owner. It's also true that the permissions are set to 777 as in: drwxrwxrwx so everyone and your Aunt Tilly now has access. If you want to take possession of the mounted partition then you can add another option:
UUID=1635066A21FD2629 /media/pierreluc102/DATA ntfs defaults,nls=utf8,uid=1000,umask=000,windows_names 0 0
Also, when I go into /media I see pierreluc102 (as my login name) then I see DATA
Becase that's the mount point you created:
UUID=1635066A21FD2629 /media/pierreluc102/DATAntfs defaults,nls=utf8,umask=000,windows_names 0 0
3- Should I just format everything into EXT4 to save the trouble?
If you are using Samba to share this partition across the network you could actually make matters worse only because samba will save with permissions that will need to be corrected. NTFS partitions are immutable so whatever samba tries to do with permissions will be ignored by Linux. You can work around it but ...
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
pierreluc102

Re: Drive permissions

Post by pierreluc102 »

Wonderful! Everything is working just fine now! I can now share files with other Windows Users and set permissions to my files!

One last thing, why is it THAT slow! I cannot beleive how slow it is! My brother can't even stream a regular standard quality video file from my PC! Is there anything I can do?

Thank you!
DrHu

Re: Drive permissions

Post by DrHu »

If I was steaming content, I would try and optimize the media storage area and the software tools/clients being used to get such files...

So I would likely use a dedicated device (aka a media server with a limited OS, perhaps server based: as that would be stripped down OS), not a shared computer to stream content
--or use a NAS (Network attached Storage), such as freenas, there are others also available..
https://en.wikipedia.org/wiki/FreeNAS
  • FreeNAS is a free network-attached storage server, supporting: CIFS (Samba), FTP, NFS, rsync, AFP protocols, iSCSI, S.M.A.R.T., local user authentication, and software RAID (0,1,5), with a web-based configuration interface. FreeNAS takes less than 64 MB once installed on CompactFlash, hard drive or USB flash drive. FreeNAS is currently distributed as an ISO image and in source form.
pierreluc102

Re: Drive permissions

Post by pierreluc102 »

My question was, is it normal that my files are being very slow? Is it because they're on NTFS?

edit: THANKS a load Altair!!
Locked

Return to “Beginner Questions”