LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Acessing mounted partitions (https://www.linuxquestions.org/questions/linux-newbie-8/acessing-mounted-partitions-264888/)

stevesk 12-10-2004 10:53 AM

Acessing mounted partitions
 
Hello guys! I have a partition at my HD, /dev/hda3, which filesystem is FAT32 and I have some music and other stuff there. When I try to mount it in a dir and open any music there with any regular user, I just see it cannot access the files, and I suppose this is the reason:

drwxr--r-- 8 root root 4096 1969-12-31 21:00 hda3

I think I should make this with the "rx" parameter to the other users, right?

As root, I have already tryed the following commands:

chmod 755 /dev/hda
chmod 755 /dev/hda3
chmod 755 /mnt/hda3 (the dir where it is mounted)

But it not worked. For some reason, the permission just keep as it is, "r" but not "rx" for the other users. I could just as root copy my mp3s from this partition to any dir under my linux partition and make them acessable for the other users, and that is what I actually do. But the problem is that I have a lot of mp3 and I think it can be waste of HD space and maybe there is another intelligent way to solve the problem.

So I would like to know, please, if anyone can help me in this problem.

Thanks so much for your attention.

EDIT: Sorry, my Linux OS is Slackware Linux 10.0

jeffreybluml 12-10-2004 11:29 AM

You might try doing the chmod recursively, as the command you did on ly changed the permissions on the directory itself, not the files contained within. To do this, just type

chmod -R 755 /mnt/hda3

Try that...

Good luck,

stevesk 12-10-2004 11:34 AM

Hmmm thanks for the help friend, but I had already tried this and didn't work. It hasn't even changed the /mnt/hda3 permissions.

jeffreybluml 12-10-2004 11:37 AM

COuld you post the contents of your /etc/fstab? The problem could be in there...

stevesk 12-10-2004 11:55 AM

Here it is, /etc/fstab:

////////

/dev/hda5 swap swap defaults 0 0
/dev/hda6 swap swap defaults 0 0
/dev/hda7 / ext3 defaults 1 1
/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
/dev/hda1 /mnt/hda1 ntfs
/dev/hda2 /mnt/hda2 ntfs
/dev/hda3 /mnt/hda3 vfat

////////

jeffreybluml 12-10-2004 11:59 AM

Hmmm, this might be the problem.

Edit the line in fstab to look like this:

/dev/hda3 /mnt/hda3 vfat auto,users,rw 0 0

Now try...

Good luck,

stevesk 12-10-2004 01:03 PM

Hmmm sorry but it did not work again...I had even tryed to set the permissions again but no success. I can see the icon to "hda3" in my desktop and it shows the first files, but not the others...just like before...it says "attempt to log in failed" when trying to access a file or a folder. Permissions still "r" and not "rw" for the others. See:

bash-2.05b$ su
Password:
bash-2.05b# chmod 755 /dev/hda
bash-2.05b# chmod 755 /dev/hda3
bash-2.05b# chmod 755 /mnt/hda3
bash-2.05b# cd /mnt
bash-2.05b# ls -al
total 37
drwxr-xr-x 8 root root 4096 2004-12-08 21:09 .
drwxr-xr-x 20 root root 4096 2004-12-09 17:41 ..
drwxr-xr-x 2 root root 4096 2002-03-16 04:34 cdrom
drwxr-xr-x 2 root root 4096 2002-03-16 04:34 floppy
drwxr-xr-x 2 root root 4096 2002-03-16 04:34 hd
dr-x------ 1 root root 8192 2004-12-09 13:59 hda1
dr-x------ 1 root root 4096 2004-12-09 12:28 hda2
drwxr--r-- 8 root root 4096 1969-12-31 21:00 hda3
bash-2.05b#

I have put everything you said in the fstab and even rebooted the system, but not worked.

jeffreybluml 12-10-2004 01:15 PM

I'm sorry, I konw this must be getting a bit annoying for you...

I'm out of ideas for now. I guess you could always try and enter it into fstab just like the root partition, and see if that works. I must be honest and admit that I don't know alot about what all the parameters in fstab mean. But, the nice thing about linux is you can play around with this stuff and not totally destroy your system. It's great for trial-and-error guys like me.

So, I guess if you're not sick of this, you can always try making the fstab line look like this...


/dev/hda3 /mnt/hda3 vfat defaults 0 0

or, if that doesn't work...

/dev/hda3 /mnt/hda3 vfat defaults 1 1

I have NO idea what the 0 0 or the 1 1 do, but obviously you see them at the end of most of the entries...so try them both...

Oh, and it occurs to me that perhaps the partition is never being mounted, so after a reboot do:

less /etc/mtab

and make sure it's listed in there. If not, do

mount /mnt/hda3

and see if that mounts it...

Good luck and, again, sorry I'm not more knowledgeable here...

michaelk 12-10-2004 01:25 PM

Permissions (chmod) can not be changed when the partition is mounted. In addition the umask=000 option allows any user to read / write to FAT32.

/dev/hda3 /mnt/hda3 vfat umask=000,user 0 0

stevesk 12-10-2004 01:55 PM

Oh thanks so much michaelk! Now it worked*...I was really not trying to change the permissions while the partition was mounted, I have care to umount before...but unfortunately until I add the line you said in /etc/fstab the things didn't work...now they are working thanks :) .

* I had to change for 022 to have I really wanted ;)

jeffreybluml: thats ok man, thanks so much you too for at least trying to help! :) . The solution was really that...

Does anyone has any link for some site that explains well these things about fstab? Thanks! :)

patkalolo 12-15-2004 01:52 AM

I am having the exact same problem. Here is the fstab line relating to my drive:

Code:

/dev/hda5        /mnt/fat32-c      vfat        umask=000,user                    0  0
And still once I mount the drive all the permission belong to the root. I can change them all I want before it is mounted though :confused:! Any ideas?

mayur 12-15-2004 03:40 AM

try with
/dev/hda5 /mnt/fat32-c vfat auto,user 0 0


All times are GMT -5. The time now is 08:24 AM.