LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-27-2005, 04:25 PM   #1
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Rep: Reputation: 33
editing /etc/fstab--for rw permissions for all users


Hi,

I am using Fedora Core 1.

My /etc/fstab file read as :
Code:
LABEL=/                 /                       ext3    defaults        1 1
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/hda7               swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1             /mnt/cdrom1             udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0
/dev/hda1               /win1                   vfat
/dev/hda5               /win2                   vfat
And i didn't have write permissions to the two vfat drives as a normal user.So i googled for a while and edited my fstab as :
Code:
LABEL=/                 /                       ext3    defaults        1 1
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/hda7               swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1             /mnt/cdrom1             udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0
/dev/hda1               /win1                   vfat    user,exec 0 0
/dev/hda5               /win2                   vfat    user,exec 0 0
The problem is that i still don't have write permissions to those two vfat drives as a normal user (I know I am wrong somewhere but don't know where please point out)

Also now I have two icons named win1 and win2 on my desktop whereas i didn't have them with the previous fstab.
So, what i want now is to have write and execute permissions for win1 and win2 for all users and also i don't want those two icons to be messing up with my desktop

Please somebody help

Thanx in anticipation

Last edited by koodoo; 03-27-2005 at 04:28 PM.
 
Old 03-27-2005, 04:31 PM   #2
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
add umask=000 to the options part of the VFAT drives.
The umask is the value of read/write/execute permissions that are NOT present. (i.e. if 777 is read+write+execute then the umask is 000).

This means that all files on those drives will be read/write and executable for everyone.

If you're wondering, the user flag just means that a regular user can mount the drive. If they should unmount as well then use 'users' instead.
 
Old 03-27-2005, 04:32 PM   #3
visaris
Member
 
Registered: Dec 2004
Distribution: gentoo
Posts: 190

Rep: Reputation: 30
do this:

Code:
LABEL=/                 /                       ext3        defaults                  1 1
none                    /dev/pts                devpts      gid=5,mode=620            0 0
none                    /proc                   proc        defaults                  0 0
none                    /dev/shm                tmpfs       defaults                  0 0
/dev/hda7               swap                    swap        defaults                  0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro     0 0
/dev/cdrom1             /mnt/cdrom1             udf,iso9660 noauto,owner,kudzu,ro     0 0
/dev/fd0                /mnt/floppy             auto        noauto,owner,kudzu        0 0
/dev/hda1               /win1                   vfat        exec,umask=000            0 0
/dev/hda5               /win2                   vfat        exec,umask=000            0 0
 
Old 03-27-2005, 05:23 PM   #4
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Original Poster
Rep: Reputation: 33
Hi,

Thanx for the help

I now have an interesting situation. My fstab file now looks like :
Code:
LABEL=/                 /                       ext3    defaults        1 1
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/hda7               swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1             /mnt/cdrom1             udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0
/dev/hda1               /win1                   vfat    exec,umask=000  0 0
/dev/hda5               /win2                   vfat    exec,umask=000  0 0
I have write permissions to /win2 for all users but for /win1 the case is different :
For /win1 i have write permissions (as a normal user) only in the first level in the directory tree or in the lowest level and not anywhere else :
i.e.

Code:
[koodoo@localhost koodoo]$ cd /win1
[koodoo@localhost win1]$ ls
Flash Fun  Movies  Songs  tc  tt6  WALLPAPERS
[koodoo@localhost win1]$
i.e. as a normal user :
I can write in /win1/
but not in /win1/Flash\ Fun or /win1/Movies or /win1/Songs .......................

also
Code:
[koodoo@localhost win1]$ ls
Flash Fun  Movies  Songs  tc  tt6  WALLPAPERS
[koodoo@localhost win1]$ cd Movies/
[koodoo@localhost Movies]$ ls
axn  Moon  tomnjerry
[koodoo@localhost Movies]$ cd axn/
[koodoo@localhost axn]$ls
first.mpeg last.mpeg

i can write in /win1/Movies/axn/

The system also appears to run remarkably slower

Any ideas ??

Also for more info fdisk -l gives :
Code:
[root@localhost root]# fdisk -l
 
Disk /dev/hda: 40.0 GB, 40057224704 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      2435  19559106    c  Win95 FAT32 (LBA)
/dev/hda2          2436      4870  19559137+   f  Win95 Ext'd (LBA)
/dev/hda5          2436      3653   9783553+   b  Win95 FAT32
/dev/hda6          3654      4804   9245376   83  Linux
/dev/hda7          4805      4870    530113+  82  Linux swap
Thanx again in anticipation
 
Old 03-28-2005, 12:36 AM   #5
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Original Poster
Rep: Reputation: 33
Hi,

Thanx guys I've resolved the problem.I just logged in as root and checked permissions for those files I wasn't able to write to as a normal user. As expected they were 555. So I simply changed them to 777 and now i have all the permissions as a normal user.

I not very clear about file permissions and masks
So sorry if I had done something stupid and kept u guys busy

Also I am now trying to learn more about file permissions and masks. Will try googling for it.
If anyone has a link to a good HOWTO on this please pass me the link

Thanx again you've been a great help.
 
Old 03-28-2005, 12:37 AM   #6
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Original Poster
Rep: Reputation: 33
Hi,

Thanx guys I've resolved the problem.I just logged in as root and checked permissions for those files I wasn't able to write to as a normal user. As expected they were 555. So I simply changed them to 777 and now I have all the permissions as a normal user.

I not very clear about file permissions and masks
So sorry if I had done something stupid and kept u guys busy

Also I am now trying to learn more about file permissions and masks. Will try googling for it.
If anyone has a link to a good HOWTO on this please pass me the link

Thanx again. You all have been a great help.
 
  


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
fstab, umask and users permissions foucault Linux - Security 3 11-03-2005 01:13 AM
Editing fstab GingerMegs Linux - Software 1 06-04-2005 04:24 PM
Editing etc/fstab- yet again:-) hitest Slackware 7 04-21-2005 12:50 PM
Who is editing my fstab???!!! laszlo Linux - Newbie 5 06-30-2004 05:37 AM
Fstab editing Ando Linux - General 4 06-29-2003 05:17 PM

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

All times are GMT -5. The time now is 12:29 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
Open Source Consulting | Domain Registration