LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-21-2008, 09:25 AM   #1
spectrum007
LQ Newbie
 
Registered: Jul 2008
Posts: 7

Rep: Reputation: 0
NTFS Write permission


hi...

my distro is centos 5.2

i have installed ntfs drivers with the following command

yum install fuse fuse-ntfs-3g dkms dkms-fuse

after that i have connected my external harddisk.
It's automatically mounted.
But, i am not able to write in ntfs partition

i got following line for 'mount' command

/dev/sda1 on /media/New Volume type ntfs (rw,noexec,nosuid,nodev,umask=222)

how i set write permission to ntfs partition?.
 
Old 12-21-2008, 11:11 AM   #2
pentode
Member
 
Registered: Dec 2005
Location: Oregon
Distribution: Debian Testing
Posts: 488

Rep: Reputation: 38
What is the error message?
 
Old 12-21-2008, 11:34 AM   #3
illusive_spirit
LQ Newbie
 
Registered: Dec 2004
Location: Somewhere in Cyberspace
Distribution: Fedora. openSUSE. Ubuntu. BackTrack
Posts: 10

Rep: Reputation: 0
Have you resolved the problem spectrum007? if you have, let's know what you did. I sure hope you are root.
 
Old 12-21-2008, 01:53 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Which desktop environment do you use? For KDE 3.5, you can right click on the icon for the drive, and select properties. Look for a box you can check to mount the drive as a normal user. I'm sure Gnome has something similar.
You can add mount options in the Properties => Volume tab.

The mount options you may want are "uid=<yourusername>,gid=<yourgroup>,fmask=0117,dmask=0007"
This will mount the ntfs filesystem with you being the owner.

Another option you can use is "fmask=0111,dmask=000". This will allow "others" write access, allowing you and anyone else to write to the filesystem.

Last edited by jschiwal; 12-21-2008 at 06:59 PM.
 
Old 12-21-2008, 03:03 PM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
You probably want umask=111 or umask=000.

umask=222 leaves you with permissions 555, which means read and exec for everybody, but no write permissions.
 
Old 12-22-2008, 08:38 PM   #6
spectrum007
LQ Newbie
 
Registered: Jul 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by i92guboj View Post
You probably want umask=111 or umask=000.

umask=222 leaves you with permissions 555, which means read and exec for everybody, but no write permissions.
i know very well because of umask=222 only i faced the problem.

when i connecting the external hard drive it's automatically mounted.
even i remounted with umask=0000. that time also, the same problem.
where i edit the default permission?
 
Old 12-22-2008, 08:44 PM   #7
spectrum007
LQ Newbie
 
Registered: Jul 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jschiwal View Post
Which desktop environment do you use? For KDE 3.5, you can right click on the icon for the drive, and select properties. Look for a box you can check to mount the drive as a normal user. I'm sure Gnome has something similar.
You can add mount options in the Properties => Volume tab.

The mount options you may want are "uid=<yourusername>,gid=<yourgroup>,fmask=0117,dmask=0007"
This will mount the ntfs filesystem with you being the owner.

Another option you can use is "fmask=0111,dmask=000". This will allow "others" write access, allowing you and anyone else to write to the filesystem.
i am using Gnome environment. but, there no check box for mount as normal user.
 
Old 12-22-2008, 09:12 PM   #8
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
I know nothing about gnome so I can't help with that

Linux-wide, this has always been configured in /etc/fstab. I know nothing about automounters either, they never worked ok for me, and anyway I prefer to mount the disks myself. When I very rarely need such a thing as automounting, I just write an udev rule.
 
Old 12-23-2008, 06:26 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Look in the Gnome menu for a gnome configuration utility. I think the actual program that runs is gconf. There is a graphical tree diagram that includes drives. I think you can modify the mounting policy there.

If your system uses PolicyKit, then you can edit the policy for mounting removable drives. I'm not at my computer now so I can't look for myself. There is a tag <active>...</active> in the policy that may say something like "admin auth" which you can change to simply "Yes". There should be other entries in the same file that you can use as a model. Using the Gnome configuration tool would be simpler and will probably edit the same config files correctly.
Also look at the "polkit-auth" or "polkit-gnome-authorization" if these tools exist. It would be better to use a tool instead of directly editing the policy file.

I think that the properties dialog you did try does have a place to enter mount options. Adding `fmask=0111,dmask=0000' may allow you to read and write even though the ownership is root, by changine the permissions for "others".

You could at least locate the policy file that sets the removable disk policy and enter the exact filename in a google search with "gnome" and/or your distro. If you find this policy file on the net, compare the one on the net with yours.

---
If the drive is mounted and used device /dev/sdb1 for example, use udevinfo to gather information such as the UUID and LABEL of the filesystem. That can uniquely identify that drives filesystem, which you can use in a mount entry in fstab. The reason to do this is to be able to manually mount the drive even if the system uses a different device node (like /dev/sdc1) the next time you plug it in. You can use the "user" mount option which along with the "uid=<yourusername>,gid=<yourgroupname>" and the UUID number which uniquely identifies the drive will allow you to mount it as a regular user.

The udevinfo command for a drive using /dev/sdb1 is:
udevinfo -q env -n /dev/sdb1
Copy the UUID=<uuid identifier> from the output. Use it for your /etc/fstab entry in place of the device field entry.
Example /etc/fstab entry. Between the angle brackets are variables you need to replace:
Code:
UUID=<uuid entry> /mnt/disk ntfs-3g rw,noauto,uid=<yourusername>,gid=<yourgroup>,fmask=0117,dmask=0007,utf8 0 0
Look in your man mount.ntfs man page. It may prefer you use file_mode= and dir_mode= in place of fmask and dmask. Look when you mount the drive. If it doesn't complain, then don't worry about it. Even if it does complain, it should still work.

Also enter "mount | grep ntfs" after automounting the disk. Use the mount options listed as a model of the mount options you want to use and just make changes to your /etc/fstab. I would base manually mounted drives under /mnt/ instead of /media. /media is meant for automounted partitions, and the HAL daemon tools will add and remove directories there. It's best not to interfere with this process.

AFAIK, it is OK if the system automounts the drive under /media and you mount it under /mnt/. For SuSE, however, HAL will refuse to mount a filesystem that exists in /etc/fstab. Let me repeat that if you add an /etc/fstab entry for an external drive, make sure you use the "noauto" mount option. You may not be able to boot up otherwise, if it isn't plugged in.

Last edited by jschiwal; 12-24-2008 at 09:41 PM.
 
  


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
openSUSE 10.3, NTFS write permission danreed007 SUSE / openSUSE 7 01-20-2008 06:02 PM
LXer: How To Enable NTFS Write Support (ntfs-3g) On Ubuntu Feisty Fawn LXer Syndicated Linux News 0 09-11-2007 08:20 PM
Ntfs Write Permission hariiyer Linux - Software 1 12-17-2005 12:44 AM
no write permission on NTFS mount zchoyt Linux - General 1 08-25-2005 09:10 PM
ntfs write and permission mathfeel Linux - Hardware 7 02-23-2005 09:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:58 AM.

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