LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   How to change permissions on an NTFS partition... (https://www.linuxquestions.org/questions/debian-26/how-to-change-permissions-on-an-ntfs-partition-544550/)

PlainDave 04-09-2007 10:47 AM

How to change permissions on an NTFS partition...
 
Hello,

I need to know how to change permissions on an NTFS partition. I've read several threads regarding this, but nothing seems to work. Please help, and with very "dumbed down", simple step-by-step instructions. Thanks much.

PlainDave

kilgoretrout 04-09-2007 12:19 PM

Post your /etc/fstab file; you need to edit that file to change permissions on a non-linux filesystem like NTFS or FAT. Also, state which partition you want to change the perms on and to what.
You should realize that there is no native write support for NTFS in linux, i.e. NTFS is read only.

PlainDave 04-10-2007 01:02 AM

Quote:

Originally Posted by kilgoretrout
Post your /etc/fstab file; you need to edit that file to change permissions on a non-linux filesystem like NTFS or FAT. Also, state which partition you want to change the perms on and to what.
You should realize that there is no native write support for NTFS in linux, i.e. NTFS is read only.

First of all, thanks for the reply. I always appreciate anyone who tries to help.

Here's my "fstab" file:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hdb1 / ext3 defaults,errors=remount-ro 0 1
/dev/hdb5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdd /media/cdrom1 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

Oddly enough, I had hda2 (the partition in this thread) in this file at one time, but I now notice that it's gone, oddly enough.

PlainDave

Junior Hacker 04-10-2007 06:25 AM

Debian Etch has ntfs-3g in repositories that give all users read/write access to NTFS, and because it is version 1.0, it is stable. I have a shared NTFS data partition between two Windows XP and 4 Linux systems, all Linux have ntfs-3g from source except Etch because either they did not have the right Fuse version, or ntfs-3g at or above version 1.0, and Fedora's package conflicts with SELinux. Debian Etch is the only one that I installed ntfs-3g from repositories and works great so far. Had to also make changes to the partitions entry in /etc/fstab also, but I'm not in Etch right now.

PlainDave 04-11-2007 12:06 PM

Quote:

Originally Posted by Junior Hacker
Debian Etch has ntfs-3g in repositories that give all users read/write access to NTFS, and because it is version 1.0, it is stable. I have a shared NTFS data partition between two Windows XP and 4 Linux systems, all Linux have ntfs-3g from source except Etch because either they did not have the right Fuse version, or ntfs-3g at or above version 1.0, and Fedora's package conflicts with SELinux. Debian Etch is the only one that I installed ntfs-3g from repositories and works great so far. Had to also make changes to the partitions entry in /etc/fstab also, but I'm not in Etch right now.

Thanks for trying to help. I don't even know what "Fuse" is, and I definitely don't know what "ntfs-3g" is. I did a "apt-cache search" for the aforementioned, but to no avail. Maybe I need more repos, ya think? :-)

I just get tired of having to open programs as root so that I can access the NTFS partition, which has tons of MP3's and text files that I've accumulated since 1994.

God bless,
PlainDave

PTrenholme 04-11-2007 02:23 PM

Put something like this:
Code:

$ cat /etc/fstab | grep ntfs
/dev/hda2              /hd/c                  ntfs ro,uid=root,gid=disk 0 0

in your /etc/fstab and add yourself to the disk group and you should be fine.

But you should google ntfs-3g. It seems to work quite well. (And, despite Junior_Hacker's comment, it works quite well on Fedora -- as long as you set SELinux to "permissive" mode.)

Junior Hacker 04-11-2007 04:27 PM

Yeah, I've read that part about the "permissive" mode also, probably in the ntfs-3g forum. But for me I would have had to set SELinux to permissive before a re-boot, once I re-booted, all hell broke loose, I could not access any system settings or administrative tasks, not even system services to re-set SELinux. Just got a little window saying "could not find program" or something. I did re-build and disabled SELinux and it worked, but then the kernel could not resume swap upon boot-up, I had to swapon every boot. So I eventually went with the source packages because I was fed up with re-building.
But the Etch .deb packages work alright, just mark it for installation in Synaptic and it will install fuse and fuselibs, the dependencies. Here is my ntfs-3g fstab set-up the way a tutorial suggested, just can't find that web page tutorial I used otherwise I would post the address.
Code:

/dev/sda3      /mnt/data      ntfs-3g umask=0,nls=utf8        0      0
Here is my apt sources.list to compare and see which repositories it may be in. The first set are Canadian mirrors. Ntfs-3g is probably in the unofficial.
Code:

###############################
##### From Debian Install #####
###############################
deb cdrom:[Debian GNU/Linux testing _Etch_ - Official Snapshot amd64 DVD Binary-1 20070216-00:44]/ etch contrib main
deb cdrom:[Debian GNU/Linux testing _Etch_ - Official Snapshot amd64 DVD Binary-3 20070216-00:44]/ etch contrib main
deb cdrom:[Debian GNU/Linux testing _Etch_ - Official Snapshot amd64 DVD Binary-2 20070216-00:44]/ etch contrib main

###############################
##### From Debian Mirrors #####
###############################

deb http://debian.yorku.ca/debian/ etch main contrib non-free
deb-src http://debian.yorku.ca/debian/ etch main contrib non-free

####################
##### Security #####
####################
deb http://security.debian.org etch/updates main contrib non-free
deb-src http://security.debian.org etch/updates main contrib non-free

##################
##### Kernel #####
##################
deb http://mirrors.kernel.org/debian/ etch main
deb-src http://mirrors.kernel.org/debian/ etch main

######################
##### Multimedia #####
######################
#gpg --keyserver hkp://wwwkeys.eu.pgp.net --recv-keys 1F41B907
#gpg --armor --export 1F41B907 | apt-key add -
deb http://www.debian-multimedia.org/ etch main
deb-src http://www.debian-multimedia.org/ etch main

######################
##### Unofficial #####
######################
#gpg --keyserver subkeys.pgp.net --recv-keys 6823D007
#gpg --armor --export 6823D007 | apt-key add -
deb http://ftp.debian-unofficial.org/debian/ etch main contrib non-free restricted
deb-src http://ftp.debian-unofficial.org/debian/ etch main contrib non-free restricted

##### Kirya #####
#gpg --keyserver wwwkeys.eu.pgp.net --recv-keys FBABB737
#gpg --export -a FBABB737 | apt-key add -
#deb http://packages.kirya.net/debian/ unstable main contrib non-free
#deb-src http://packages.kirya.net/debian/ unstable main contrib non-free


PTrenholme 04-11-2007 08:38 PM

Quote:

Originally Posted by Junior Hacker
Yeah, I’ve read that part about the “permissive” mode also, probably in the ntfs-3g forum. But for me I would have had to set SELinux to permissive before a re-boot, once I re-booted, all hell broke loose, I could not access any system settings or administrative tasks, not even system services to re-set SELinux. Just got a little window saying “could not find program” or something. I did re-build and disabled SELinux and it worked, but then the kernel could not resume swap upon boot-up, I had to swapon every boot. So I eventually went with the source packages because I was fed up with re-building. [snip]

My Fedora is the 32 bit version running on an old laptop (AMD 3000+ CPU). The 64-bit Fedora 6 release has had, from what I’ve seen in the fora, some problems. Perhaps you’ll have better luck with FC7 when it’s released at the end of May.

Oh, the problem with SELinux is, if I recall correctly, that our friends in the NSA, in their infinite wisdom, decided that no file system driver name could possibly contain a dash, so ntfs-3g is always rejected as invalid. The other problem is that the developers of SELinux have not yet decided how, or if, to fix the problem, and attempts to get a policy for ntfs-3g to work have all failed.

On the other hand, I think I saw a rumor that the ntfs project may, eventually, incorporate the ntfs-3g functionally into the ntfs driver.

Junior Hacker 04-12-2007 01:43 AM

Quote:

On the other hand, I think I saw a rumor that the ntfs project may, eventually, incorporate the ntfs-3g functionally into the ntfs driver.
Sounds sensible to me, just as long as Microsoft is willing to play ball and not make subtle changes every now and then. Although change will always be inevitable, just as long as it's not too often.

PlainDave 04-13-2007 02:38 PM

Thanks again for all the help. I have questions, however.

Does ntfsprogs, ntfs-3g, fuse, fuselibs, etc, have a GUI, or are they strictly command-line progs? I have them installed, according to Synaptic, but I can't find them in the menu, nor can I seem to access anything about them in terminal.

Also, in my fstab file, I changed the line:
/dev/hda2 /home/dad/lgpart ntfs r,user,noauto 0 0

to:
/dev/hda2 /home/dad/lgpart ntfs ro,uid=root,gid=disk 0 0

Upon restarting KDE, nothing seems different. I still have to open amaroK as root to be able to play anything from that drive. Same thing goes for viewing any images. What am I not doing right? Are spaces an adequate separator in fstab, or do I need to use tabs? (I'm now grasping at straws!) :scratch:

Thanks again,
PlainDave
I miss DOS.

Junior Hacker 04-13-2007 02:53 PM

Generally, when editing fstab, you have to hit the "Tab" key between entries rather than the space bar, Mandriva does not use the format and probably others, but Debian does, if I remember correctly, you have to tab twice after the first couple entries. Ntfs-3g and fuse fuselibs just give you read write access to ntfs partitions. Normally with Etch you can only read ntfs, (ro). If you look at the fstab line I posted there is no (ro) in it, which stands for read only. Once you change your fstab to include the same entries as mine except for the first two entries which must be customized to your setup, write a little note with kwrite or something and save it to the ntfs partition, if you don't get any errors, it is read/write. After re-booting of course. Ntfsprogs are command line tools.

Junior Hacker 04-13-2007 03:02 PM

BTW:
Ntfsprogs is not required to rw to ntfs when you have ntfs-3g. You'll notice the file system type in my fstab is "ntfs-3g", you did not include the "3g", also the uid=root is probably why only root can access it. Your fstab should look like this:
Code:

/dev/hda2        /home/dad/lgpart        ntfs-3g  umask=0,nls=utf8    0      0
You have your /home formatted ntfs? Are you sure you altered the correct line in fstab, better be careful or there will be problems, make sure to alter the line for the Windows or ntfs partition/drive.

jschiwal 04-13-2007 03:19 PM

You can also change the uid value in the ntfs entry of /etc/fstab to your own username. Here is a similar line on my laptop:
Code:

/dev/hda1      /windows                ntfs    rw,nls=utf8,uid=jschiwal,gid=jschiwal  0 0
You could instead use umask to give "others" access to the drive. I would recommend using "fmask" and "dmask" instead to allow "x" access for directories but not for files. For external drives, add the options "noauto" and "user". Of course use your own username and default group name for the "uid" and "gid" options. Also consider the "noexec", "nodev" and "nosuid" options for a windows drive as well.

I would not recommend adding yourself to the disk group because that would allow you access to the devices as well, which could be dangerous.

PlainDave 04-13-2007 04:49 PM

Quote:

Originally Posted by Junior Hacker
BTW:
Ntfsprogs is not required to rw to ntfs when you have ntfs-3g. You'll notice the file system type in my fstab is "ntfs-3g", you did not include the "3g", also the uid=root is probably why only root can access it. Your fstab should look like this:
Code:

/dev/hda2        /home/dad/lgpart        ntfs-3g  umask=0,nls=utf8    0      0

I added the above line to my fstab file and "commented" out the one I had previously. I then did a reboot and still had to manually mount the partition through terminal. Just FYI.

Quote:

Originally Posted by Junior Hacker
You have your /home formatted ntfs? Are you sure you altered the correct line in fstab, better be careful or there will be problems, make sure to alter the line for the Windows or ntfs partition/drive.

"/home/dad/lgpart" is the mount point that I chose to use for the ntfs partition (/dev/hda2). Did I do that wrong too? :cry:

Actually, this might be the "crux" of the problem. I have Debian installed on a 15gig hard drive, which is formatted to ext3. I have another HD (40gig) which has tons of images, music, text files, and other important "archived" data that I can access anytime I want, but I have to do that as root - inconvenient. And, I'm not referring to changing anything on the ntfs partition, just accessing the data. I know that I can possibly ruin the ntfs partition by trying to write to it from Linux.

I would ask about jumpers and IDE cables, but the GRUB bootloader works fine with the current hardware configuration.

Thanks,
PlainDave

Junior Hacker 04-13-2007 05:00 PM

There's no need to touch jumpers or cables. Usually when you install Linux, if you don't specify/create a separate /home partition it will be part of the / (root) file system tree. Which means it should be formatted ext2, or ext3 by default. And even if you did make a separate /home partition, Debian would not format it ntfs because that is not a native Linux file system. It appears you made changes to your separate /home partition if fstab because if /home was not on it's own partition and part of the / tree, there would not be a line for it in fstab.
How about if you post the results of the command: fdisk -l
And also post the contents of /etc/fstab by copying and pasting it here. And tell us how you installed Debian, whether you created 1, 2, or 3 partitions and which ones they were to the best you can remember.


All times are GMT -5. The time now is 05:13 PM.