LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-27-2007, 02:00 PM   #1
StefanP
Member
 
Registered: Apr 2007
Distribution: Debian 4
Posts: 142

Rep: Reputation: 15
cannot change permissions on files


I have an NTFS disk where all my files are located (mp3s, photos, etc.) and I can access it as root (or through Disks administration utility), however i want to access it as a regular user (playing music an so on...). I tried
to change the permisions with following command:

chmod o+rx -R /tmp/disks-conf-hdb1

and it did change the permissions on all subdirectories but I got a message that it cannot do that for each and every file on those subdirectories... So now I can access the folders as a regular user and see the files but cannot access the files... not realy helpfull and certainly not funny.

What should I do?
 
Old 04-27-2007, 02:13 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
In the /etc/fstab file, mount the disk with a umask=0222 (i.e. add that to the options column).
 
Old 04-27-2007, 02:18 PM   #3
StefanP
Member
 
Registered: Apr 2007
Distribution: Debian 4
Posts: 142

Original Poster
Rep: Reputation: 15
thanks for the advice... but a little more detailed instructions would be helpful for a newbie (like step by step ? :-)
 
Old 04-27-2007, 04:25 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
I'm not sure what distro you're using or what editors you have available to you, but basically, you need to edit the file /etc/fstab as the root user. First, unmount the partition using your graphical tool.

I typically use a command line for editing; type su (then enter root's password) -- this will make you root (BE VERY CAREFUL). You'll need to find out what drive has windows on it by typing fdisk -l (that's -L, not -1). Make note of the partition that says "NTFS", it should be something like /dev/hda1 or /dev/sda1.

Make a backup of the fstab file -- cp /etc/fstab /etc/fstab.orig.

To edit the fstab file, type nano /etc/fstab which should give you a pretty easy command line editor. The commands at the bottom like ^X mean press CTRL+X. Use your arrow keys to navigate.

Your file should look something like this:
Code:
/dev/hda2  	/  	ext3  	defaults  	1 1
/dev/hda3 	/swap 	swap 	defaults 	0 0
/dev/cdrom 	/media/cdrom 	auto 	ro,noauto,user,exec 	0 0
You want to add a line like this:
Code:
/dev/hda1    /media/windows ntfs  user,nls=utf8,umask=0222 0 0
Change /dev/hda1 to whatever your windows partition is and/or change /media/windows to whatever directory you want to mount the NTFS partition (some people prefer to put it in the /mnt directory, like /mnt/windows). Then save the file and type mount -a, which should remount all filesystems. Then you should be able to go to whatever directory you put in fstab for the mount point and read any files on the partition.
 
Old 04-30-2007, 05:35 PM   #5
tonybehar
LQ Newbie
 
Registered: Oct 2003
Location: Israel
Distribution: UBUNTUs Feisty, Edgy, Dapper
Posts: 1

Rep: Reputation: 0
pljvaldez 's last post very useful, helped me solve my problem
trouble was for some reason permissions o f /media/sda5 the placeholder of ntfs were dr-x----------- so I sudo deleted it and created new which mounted ok
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to change the permissions for files ? Aerolinux Linux - Hardware 4 02-23-2007 10:12 PM
Cant change permissions of files on a mounted fat16 attockonian Slackware 6 08-01-2006 01:52 PM
Change permissions 4 many files at 1ce? TruthSeeker Linux - Newbie 3 10-31-2005 09:23 AM
How do you change a files permissions Charlie Chan Linux - Security 8 10-20-2004 11:19 PM
How do I change permissions of files/directories? Okashira Linux - Newbie 5 01-12-2004 06:11 PM


All times are GMT -5. The time now is 01:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration