LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Changing permissions (https://www.linuxquestions.org/questions/linux-newbie-8/changing-permissions-155835/)

NomDeGuerre 03-10-2004 09:29 AM

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.

Mega Man X 03-10-2004 09:39 AM

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!

Oliv' 03-10-2004 09:40 AM

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 ;)

NomDeGuerre 03-10-2004 09:59 AM

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.

Mega Man X 03-10-2004 10:07 AM

did you create the directory /fat-d ? You've to create it first :)

NomDeGuerre 03-10-2004 10:11 AM

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?

Mega Man X 03-10-2004 10:14 AM

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!

NomDeGuerre 03-10-2004 11:07 AM

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.

Oliv' 03-10-2004 11:23 AM

you just need to umount vfat partition and remount it :)
Code:

umount /fat-d
mount /fat-d


Mega Man X 03-10-2004 11:54 AM

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

Starta om den då :)

NomDeGuerre 03-10-2004 11:55 AM

Great! Thanks alot to all of you.


All times are GMT -5. The time now is 07:51 AM.