LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I change file permissions in windows ntfs partition.Even root can't change it (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-change-file-permissions-in-windows-ntfs-partition-even-root-cant-change-it-865988/)

e3399 03-02-2011 10:27 AM

How can I change file permissions in windows ntfs partition.Even root can't change it
 
Here is my fstab's content:
/dev/sda7 /media/e ntfs defaults 0 0
/dev/sda8 /media/f ntfs-3g silent,umask=000 0 0

[root@localhost code]# ll 2
-rwxrwxrwx. 1 root root 0 Mar 2 20:19 2
[root@localhost code]# chmod -c 100 2
mode of `2' changed to 0100 (--x------)
[root@localhost code]# ll 2
-rwxrwxrwx. 1 root root 0 Mar 2 20:19 2

Any help will be appreciated!

druuna 03-02-2011 10:47 AM

Hi,

You are using linux to change permissions on a windows filesystem. That won't work, they (linux filesystems like ext3 and windows filesystems like ntfs) are not based on the same principles.

The fact that you do see permissions and users/groups after mounting a none-linux filesystem is mere eye-candy and not very valuable.

I'm not aware of any linux/unix tools that can change permissions on ntfs.

Hope this helps.

jschiwal 03-02-2011 10:56 AM

The ownership and permissions of the files and directories in an NTFS filesystem are determined when mounting. All files will have the same permissions. All directories will have the same permissions.

Look at the manpage for mount.ntfs and ntfs-3g. Use the "fmask", "dmask", "uid" and "gid" options to determine the permissions.

e.g. uid="e3339",fmask=0137,dmask=0027

These options will make e3339 the owner, with permissions of 0640 for files and 0750 for directories. The `x' bit is needed for directories to enter them.

e3399 03-02-2011 10:54 PM

I got it.
Thank you for all your help.


All times are GMT -5. The time now is 09:12 AM.