LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Permission woes (https://www.linuxquestions.org/questions/linux-newbie-8/permission-woes-94720/)

hildog 09-20-2003 12:37 AM

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 ?

MasterC 09-20-2003 12:45 AM

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

hildog 09-20-2003 02:34 AM

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.:)

hildog 09-20-2003 03:15 AM

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.

MasterC 09-20-2003 03:46 AM

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

hildog 09-20-2003 02:02 PM

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.

MasterC 09-20-2003 02:54 PM

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


All times are GMT -5. The time now is 01:35 AM.