LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-09-2007, 10:47 AM   #1
PlainDave
LQ Newbie
 
Registered: Nov 2006
Location: Kansas City, MO area
Distribution: Ubuntu and Ubuntu-MATE
Posts: 22

Rep: Reputation: 0
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
 
Old 04-09-2007, 12:19 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
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.
 
Old 04-10-2007, 01:02 AM   #3
PlainDave
LQ Newbie
 
Registered: Nov 2006
Location: Kansas City, MO area
Distribution: Ubuntu and Ubuntu-MATE
Posts: 22

Original Poster
Rep: Reputation: 0
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
 
Old 04-10-2007, 06:25 AM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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.
 
Old 04-11-2007, 12:06 PM   #5
PlainDave
LQ Newbie
 
Registered: Nov 2006
Location: Kansas City, MO area
Distribution: Ubuntu and Ubuntu-MATE
Posts: 22

Original Poster
Rep: Reputation: 0
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

Last edited by PlainDave; 04-11-2007 at 12:08 PM.
 
Old 04-11-2007, 02:23 PM   #6
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.)
 
Old 04-11-2007, 04:27 PM   #7
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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

Last edited by Junior Hacker; 04-12-2007 at 01:45 AM.
 
Old 04-11-2007, 08:38 PM   #8
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.
 
Old 04-12-2007, 01:43 AM   #9
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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.
 
Old 04-13-2007, 02:38 PM   #10
PlainDave
LQ Newbie
 
Registered: Nov 2006
Location: Kansas City, MO area
Distribution: Ubuntu and Ubuntu-MATE
Posts: 22

Original Poster
Rep: Reputation: 0
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!)

Thanks again,
PlainDave
I miss DOS.
 
Old 04-13-2007, 02:53 PM   #11
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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.
 
Old 04-13-2007, 03:02 PM   #12
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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.

Last edited by Junior Hacker; 04-13-2007 at 03:05 PM.
 
Old 04-13-2007, 03:19 PM   #13
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.

Last edited by jschiwal; 04-13-2007 at 03:21 PM.
 
Old 04-13-2007, 04:49 PM   #14
PlainDave
LQ Newbie
 
Registered: Nov 2006
Location: Kansas City, MO area
Distribution: Ubuntu and Ubuntu-MATE
Posts: 22

Original Poster
Rep: Reputation: 0
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?

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
 
Old 04-13-2007, 05:00 PM   #15
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ntfs partition permissions trawler Linux - General 2 10-23-2005 05:27 PM
Can't change the read permissions on an NTFS partition as root? EOHooligan Linux - Newbie 4 01-09-2005 06:48 AM
Change permissions on ntfs drive PieEater Linux - Newbie 2 09-11-2004 09:26 AM
Permissions for NTFS partition MikTheUser Slackware 5 07-08-2004 07:41 PM
Change permissions on NTFS partition to read for all users bax Linux - Newbie 6 05-13-2002 07:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration