LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 03-10-2004, 09:29 AM   #1
NomDeGuerre
Member
 
Registered: Oct 2003
Posts: 136

Rep: Reputation: 15
Changing permissions


I have this harddrive where I've kept all files from the time that I used Windows. So it's FAT32. Now, I can't access these files when I'm not logged in as root and that's no fun. I tried the following:

Code:
bash-2.05b$ su
Password: 
bash-2.05b# chown -R abuse /fat-d
And then I get this big list of files and it says "Operation not permitted" after all of them.
I tried reading man chmod but I don't really get it and I wanna get this donw as quick as possible.
 
Old 03-10-2004, 09:39 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
That won't work. You've to make them available editing the file fstab, located at /etc.

This is how mine looks like:

Code:
/dev/hda2		/mnt/win_d		vfat uid=500,gid=500,umask=000,exec,dev,suid,rw 1 0
Basically, that means:

/partition / mount point < permissions>

The above code mounts the second slice of my hd to /mnt/win_d and all users can access my win partitions.

Regards!
 
Old 03-10-2004, 09:40 AM   #3
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
The good way to allow someone else than root to access FAT32 partition is to use mount options. A quick (and dirty according to me), is to add the following option in your /etc/fstab: umask=000. Or a proper solution is to mount your partition with a GID different then root. For example create a group named vfat with a GID of 500, and then add as option in your /etc/fstab: gid=500. Then add user you want to access vfat partition to the vfat group
 
Old 03-10-2004, 09:59 AM   #4
NomDeGuerre
Member
 
Registered: Oct 2003
Posts: 136

Original Poster
Rep: Reputation: 15
Mine says

Code:
/dev/hdd1        /fat-d           vfat        defaults         1   0
and I changed it to

Code:
/dev/hdd1        /fat-d           vfat        uid=100, umask=000, exec, dev, suid, rw         1   0
I also tried uid=1000 since I'm not sure which uid my user has but that didn't work either. I looked at /etc passwd and there it says ":x:1000:100:,,,:" after my username.
 
Old 03-10-2004, 10:07 AM   #5
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
did you create the directory /fat-d ? You've to create it first
 
Old 03-10-2004, 10:11 AM   #6
NomDeGuerre
Member
 
Registered: Oct 2003
Posts: 136

Original Poster
Rep: Reputation: 15
When I installed Slackware I chose that harddrive and gave it the name /fat-d. Other than that I haven't done anything to it. But I can access it by going into /fat-d as root so it's created then right?
 
Old 03-10-2004, 10:14 AM   #7
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
yup. Only the permissions seems weird... hmmm.. check this link:

http://members.cox.net/laitcg/new/intro.html

It's the best slackware tutorial there is in my honest opinion. I've print it out and the guy teaches about mounting windows partitions for write and reading. But I pretty much got it from there, but take a look anyway!

Good luck!
 
Old 03-10-2004, 11:07 AM   #8
NomDeGuerre
Member
 
Registered: Oct 2003
Posts: 136

Original Poster
Rep: Reputation: 15
On that site it says
Code:
/dev/hda1 /win98 vfat uid=500,gid=500,umask=000,exec,dev,suid,rw 1 0
and mine says
Code:
/dev/hdd1        /fat-d           vfat        uid=500,gid=500,umask=000,exec,dev,suid,rw         1   0
but that still won't work. Should I restart my computer or anything?

Oh well, maybe the best thing would be to get rid of all films and music and save the most important stuff on CD's and format the disk.
 
Old 03-10-2004, 11:23 AM   #9
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
you just need to umount vfat partition and remount it
Code:
umount /fat-d
mount /fat-d
 
Old 03-10-2004, 11:54 AM   #10
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
Oliv' is correct . Rebooting would also work, since Linux will search for fstab to mount partition during the boot time. Don't format the disk . There's always another way with Linux ...

Starta om den då
 
Old 03-10-2004, 11:55 AM   #11
NomDeGuerre
Member
 
Registered: Oct 2003
Posts: 136

Original Poster
Rep: Reputation: 15
Great! Thanks alot to all of you.
 
  


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
Changing Permissions jong357 Linux - General 5 01-25-2005 02:39 PM
Changing Many Permissions at Once food188 Linux - General 3 11-02-2003 08:17 AM
Changing permissions Mladek Linux - Software 7 07-09-2003 08:57 AM
Changing Permissions linuxfond Linux - Newbie 11 07-01-2003 02:48 PM
Permissions Changing ew2003 Linux - Newbie 1 04-29-2003 04:30 PM

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

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