LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-28-2007, 01:41 PM   #1
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237
Blog Entries: 8

Rep: Reputation: 59
mounting sdaX/sdbX with RW permissions


Im using fedora 7 and using fluxbox for my desktop most of the time, and KDE the rest of the time. Im dual booting with windows 98. I did a search for my hard drives and sda1 is the windows partition, sdb1 is my usb drive, and sda5 is my linux hdd. i created directories for mount points within my home directory and have also tried using the default /media/.

so i tried to mount the windows partition like this:
#mkdir /mount/hdd
#mount -t vfat /dev/sda1 /media/hdd

it comes up with read write and execute wfor root and read and execute for user and other.

i tried to change the permissions with
#chmod 777 /media/hdd

i received no error message but it didnt set the default permissions.

i then loaded konqueror from root and tried to right click on the mounted hdd. when i opened up the properties dialog and selected permissions, i was able to change them. when i clicked ok it went thru the normal process, spawned no error message, and then when i opened the properties again nothing was changed, no write permission for users or group.

i googled chmod and it said it was set to rw by default but i could use the -o rw option so i tried

#mount -o rw /dev/sda1 /media/hdd

(this was after using umount). Still only rwx in root, no write in user or group.

when i tried chown it gave me a permission denied error.

when i am in KDE, almost everything automounts which is cool, but i want to be able to use fluxbox because my box has only 384M ram. I also notice when i am in KDE that the usb automounts with rw for user and group.

What am i doing wrong?

btw i realize i did not copy and paste from my konsole as i am not at my PC atm. i will be able to copy and paste in any future replies. thanks a lot.
 
Old 07-28-2007, 02:39 PM   #2
rtspitz
Member
 
Registered: Jan 2005
Location: germany
Distribution: suse, opensuse, debian, others for testing
Posts: 307

Rep: Reputation: 33
As you know fat32 does not know about file permissions, so there is also no way for linux to store them there.
File permissions must be set at mount time.

e.g.: mount -t vfat /dev/sda1 /mnt/win98 -o rw,uid=0,gid=104,umask=002

uid = user id
gid = group id

file perms = 777 - umask

so rwx rwx r-x is 775 --> umask needs to be 002
 
Old 07-28-2007, 03:49 PM   #3
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237

Original Poster
Blog Entries: 8

Rep: Reputation: 59
thank you very much, it worked with only a little alteration.
[root@localhost jp]# mount -t vfat /dev/sda1 /media/hdd -o rw,uid=0,gid=104,umask=002
[root@localhost jp]# ls -l /media
total 22
dr-xr-xr-x 2 root root 2048 2007-07-27 22:43 cd
drwxr-xr-x 2 root root 4096 2007-07-14 19:12 dvd
drwxrwxr-x 10 root 104 4096 1969-12-31 19:00 hdd
drwxr-xr-x 2 root root 4096 2007-07-27 14:18 usb1


then i changed umask to 000 and viola:

[root@localhost jp]# mount -t vfat /dev/sda1 /media/hdd -o rw,uid=0,gid=104,umask=000
[root@localhost jp]# ls -l /media
total 22
dr-xr-xr-x 2 root root 2048 2007-07-27 22:43 cd
drwxr-xr-x 2 root root 4096 2007-07-14 19:12 dvd
drwxrwxrwx 10 root 104 4096 1969-12-31 19:00 hdd
drwxr-xr-x 2 root root 4096 2007-07-27 14:18 usb1


thanks a lot.
 
  


Reply



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
mounting and permissions kronchev Linux - Software 2 03-26-2005 04:28 AM
Mounting Permissions canuck_barlow Linux - Newbie 11 03-16-2005 09:33 PM
Mounting and Permissions ngreimel Linux - Newbie 3 08-10-2004 04:26 PM
Mounting Permissions ewto Linux - Newbie 2 09-30-2003 04:22 AM
Mounting permissions loganwva Linux - Networking 2 04-25-2002 04:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:53 PM.

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
Open Source Consulting | Domain Registration