LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Accessing a fat32 Partition (https://www.linuxquestions.org/questions/slackware-14/accessing-a-fat32-partition-143825/)

Cr4wford 02-08-2004 06:00 PM

Accessing a fat32 Partition
 
During the Slackware installation, it automatically detected my Windows partitions and asked if I wanted to mount them. I clicked yes and set them up. Now, I can access those partitions when logged in as root, but not as a normal user. When I try to go to /data (it's mountpoint) in konqueror it says "Access denied to /data". Here's what's in my /etc/fstab file:

Code:

/dev/hda8        swap            swap        defaults        0  0
/dev/hda6        /                reiserfs    defaults        1  1
/dev/hda3        /boot            ext2        defaults        1  2
/dev/hda7        /usr            reiserfs    defaults        1  2
/dev/hda10      /var            reiserfs    defaults        1  2
/dev/hda11      /home            reiserfs    defaults        1  2
/dev/hda9        /data            vfat        auto,users,rw,exec,uid=1000,gid=1001,umask=777        1  0
/dev/hda5        /wind            vfat        defaults        1  0
/dev/hda1        /winc            vfat        defaults        1  0
/dev/cdrom      /mnt/cdrom      iso9660    noauto,owner,ro  0  0
/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0

I'm trying to access the hda9 (/data) partition as a normal user. Any help will be greatly appreciated. Thanks.

g-rod 02-08-2004 06:20 PM

You are mounting data as user 1000 and group 1001. What is the group id of users listed in /etc/groups set the gig equal to that value in the fstab file.

Cr4wford 02-08-2004 06:35 PM

Thanks for your help. Unfortunately, it didn't work. Now, when I try to access it as root or as a regular user, it says "You do not have enough permissions to read file:/data".

g-rod 02-08-2004 06:38 PM

Sorry it's not gig but gid=100. After making the change you need to remount the filesystem.

Cr4wford 02-08-2004 06:43 PM

Yeah, I understood and made it gid=100. I remounted the filesystem, but it's still giving me the same error.

g-rod 02-08-2004 06:46 PM

What is the output of
cat /etc/passwd;
cat /etc/group;
What user are you logged in as?
ls -l the file/directory you are trying to access.

Cr4wford 02-08-2004 06:49 PM

Code:

crawford@Kevin:~$ cat /etc/passwd
root:x:0:0::/root:/bin/bash
bin:x:1:1:bin:/bin:
daemon:x:2:2:daemon:/sbin:
adm:x:3:4:adm:/var/log:
lp:x:4:7:lp:/var/spool/lpd:
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/:
news:x:9:13:news:/usr/lib/news:
uucp:x:10:14:uucp:/var/spool/uucppublic:
operator:x:11:0:operator:/root:/bin/bash
games:x:12:100:games:/usr/games:
ftp:x:14:50::/home/ftp:
smmsp:x:25:25:smmsp:/var/spool/clientmqueue:
mysql:x:27:27:MySQL:/var/lib/mysql:/bin/bash
rpc:x:32:32:RPC portmap user:/:/bin/false
sshd:x:33:33:sshd:/:
gdm:x:42:42:GDM:/var/state/gdm:/bin/bash
pop:x:90:90:POP:/:
nobody:x:99:99:nobody:/:
crawford:x:1000:100:Kevin Crawford,,,562.597.5130:/home/crawford:/bin/bash
crawford@Kevin:~$ cat /etc/group
root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
sys::3:root,bin,adm
adm::4:root,adm,daemon
tty::5:
disk::6:root,adm
lp::7:lp
mem::8:
kmem::9:
wheel::10:root
floppy::11:root
mail::12:mail
news::13:news
uucp::14:uucp
man::15:
games::20:
slocate::21:
utmp::22:
smmsp::25:smmsp
mysql::27:
rpc::32:
sshd::33:sshd
gdm::42:
shadow::43:
ftp::50:
pop::90:pop
nobody::98:nobody
nogroup::99:
users::100:
console::101:
crawford:*:1000:
crawford@Kevin:~$ ls -l /data
/usr/bin/ls: /data: Permission denied

I'm logged in as crawford.

Thanks for your help.

g-rod 02-08-2004 06:49 PM

O s__t I forgot also add umask=0 in addition to gid=100

Cr4wford 02-08-2004 06:52 PM

Just added umask=0. No luck.

g-rod 02-08-2004 06:58 PM

What is the output of
ls -l / | grep data;
ls -l /data/*;

Cr4wford 02-08-2004 07:00 PM

Code:

crawford@Kevin:~$ ls -l / | grep data
d---------    5 crawford users      16384 Dec 31  1969 data/
crawford@Kevin:~$ ls -l /data/*
/usr/bin/ls: /data/*: Permission denied
crawford@Kevin:~$


g-rod 02-08-2004 07:06 PM

As root unmount the /data filesystem and post the output from the two ls below
ls -l / | grep data;
then
mount /dev/hda9 /data -o gid=100,umask=0;
ls -l / | grep data;

Cr4wford 02-08-2004 07:08 PM

Code:

root@Kevin:/home/crawford# umount /dev/hda9
umount: /dev/hda9: not mounted
root@Kevin:/home/crawford# ls -l / | grep data
drwxr-xr-x    2 root    root          48 Jan 31 18:21 data
root@Kevin:/home/crawford# mount /dev/hda9 /data -o gid=100,umask=0
root@Kevin:/home/crawford# ls -l / | grep data
drwxrwxrwx    5 root    users      16384 Dec 31  1969 data
root@Kevin:/home/crawford#


g-rod 02-08-2004 07:10 PM

Those permissions look good. Can you
echo "test" > /data/test;
as a normal user now?

Cr4wford 02-08-2004 07:14 PM

Code:

crawford@Kevin:~$ echo "test" > /data/test
crawford@Kevin:~$

And there's a "test" file with the word "test" in it, so it works. I'm listening to music off of the partition as well.


All times are GMT -5. The time now is 12:52 AM.