LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 09-20-2003, 12:37 AM   #1
hildog
Member
 
Registered: Sep 2003
Location: New York, NY
Distribution: Red Hat 9
Posts: 33

Rep: Reputation: 15
Question Permission woes


I've just installed Red Hat 9 a couple of days ago and so far everything is going pretty well...

On my laptop I've got an 80 Gig HD...20 Gig partition for WInXP; 8 Gig partition for Linux; 2 Gig partition for swap; 50 Gig partition for files and apps which will hopefully one day be used by both OS's. The 50 Gig NTFS partition (dev/hda4) mounts just fine to /mnt/win.

As root, as one would expect, I have full access to /mnt/win...but when I'm logged in as my non-root user, I can't seem to be able to access this dir. I've tried changing permission settings, but I still can't quite get it:

[hildog@localhost hildog]$ cd /mnt/win
bash: cd: /mnt/win: Permission denied
[hildog@localhost hildog]$ chmod 700 /mnt/win
chmod: changing permissions of `/mnt/win': Read-only file system
[hildog@localhost hildog]$ cd /mnt
hildog@localhost mnt]$ ls
cdrom win
[hildog@localhost mnt]$ cd win
bash: cd: win: Permission denied
[hildog@localhost mnt]$ chmod 700 win
chmod: changing permissions of `win': Read-only file system
[hildog@localhost mnt]$ cd win
bash: cd: win: Permission denied]

As you can see, I get the "Read-only file system" message when I try to change the permissions...how can I access this dir as a regular user ?
 
Old 09-20-2003, 12:45 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Welcome to LQ

You cannot change permissions on windoze filesystems from Linux (better said as Linux doesn't read permissions on windoze files). That said, to give the impression of permissions, you set it up in your options when you mount it, or in /etc/fstab to allow users to access the files and the rights you want them to have on them.

Something like:
/dev/hdx /mnt/win ntfs umask=000,users,auto,ro 0 0

Should work.

Something else to note, Linux cannot (for all intents and purposes) write to NTFS partitions.

Last but not least:
If you don't have rights on something, you cannot gain rights as a non-privileged user. You'll need to chmod/chown with a priv'd user or root to give access to a file/directory.

Cool
 
Old 09-20-2003, 02:34 AM   #3
hildog
Member
 
Registered: Sep 2003
Location: New York, NY
Distribution: Red Hat 9
Posts: 33

Original Poster
Rep: Reputation: 15
Okay, well then that solves and creates another problem...since I need to write to that particular partition from both Linux & XP, I can't format it as NTFS...so what file system should I use for it (bearing in mind that I want to be able to read and write from both XP & Linux) ? Re-formatting as FAT32 will work, right ? Isn't there supposed to be some kind of FIPS utility or something that will allow me to re-format the file system without destroying the data ? Not that it isn't all backed up, but if I don't have to restore the files, then so much the better...

Thanks for the quick response.
 
Old 09-20-2003, 03:15 AM   #4
hildog
Member
 
Registered: Sep 2003
Location: New York, NY
Distribution: Red Hat 9
Posts: 33

Original Poster
Rep: Reputation: 15
And now it's a little bit later...I've successfully converted the NTFS partition to FAT32 without destroying any files, mounted it, and read it from Linux...now my problem (which is almost solved) is that I can't write to it. What do I have to do in order to be able to write to this partition from both Linux & Windows ?

Thanks again.

Last edited by hildog; 09-20-2003 at 03:16 AM.
 
Old 09-20-2003, 03:46 AM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
No problem How'd you go about the conversion anyway?

It's all in your options you supply when mounting the device, or within /etc/fstab. Here's my working entry for fat32 on my system:
Code:
/dev/hdb6        /mnt/fat32       vfat        umask=000,auto,users,rw   1   0


The part that is the 'options' is right after you specify the filesystem (in fstab).

Cool
 
Old 09-20-2003, 02:02 PM   #6
hildog
Member
 
Registered: Sep 2003
Location: New York, NY
Distribution: Red Hat 9
Posts: 33

Original Poster
Rep: Reputation: 15
Well, I cheated...I used Partition Magic in Windows...though I'd love to know how to do it in Linux for future reference.

So after I changed fstab to reflect those changes, now I can read and write just fine...but when I installed Firebird on my newly accessible partition, I can't seem to be able to get it to run from there...then when I moved it (Firebird) back to my home dir, it ran just fine...is there some kind of option I need in fstab that lets me run applications ?

Thanks again for the help.
 
Old 09-20-2003, 02:54 PM   #7
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Yes, you normally don't want to allow things to be executed from a non-linux partition, but if you aren't concerned about that, then add 'exec' in your options area:
umask=000,auto,users,exec,rw

Cool
 
  


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
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
cd permission woes linuxnube Linux - Newbie 1 05-18-2004 04:44 PM
9.2 Woes kyte Mandriva 4 11-08-2003 05:22 PM
X woes norfenstein Slackware 9 03-13-2003 12:11 AM
IP Woes :( adcworks Linux - Networking 8 08-05-2002 11:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:47 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