Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

partitions permission query

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
oaridus
Posts: 24
Joined: 2010-05-07 14:11

partitions permission query

#1 Post by oaridus »

Hi, I am trying to save a document in a mounted partition but its says I don't have the permissions to save the file. It says this for any partition. I am only able to save it in my home directory. How to I solve this. Basically I am trying to access a file in linux in windows xp. So I need to save the file in fat 32 partition which it is not allowing me to do. Please help

User avatar
sunrat
Administrator
Administrator
Posts: 6463
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 473 times

Re: partitions permission query

#2 Post by sunrat »

You can specify the owner and group for a vfat partition automounted at boot in /etc/fstab.

Code: Select all

/dev/sdXX                   /mnt/<mountpoint>                    vfat            auto,rw,quiet,umask=000,shortname=lower,uid=1000,gid=1000   0      0
Substitute sdXX for the actual partition and /mnt/<mountpoint> for the actual mountpoint. Your actual uid and gid can be found by running in a terminal

Code: Select all

id
Edit fstab as root then remount or reboot and your partition will be writable as the user specified by the uid.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

oaridus
Posts: 24
Joined: 2010-05-07 14:11

Re: partitions permission query

#3 Post by oaridus »

My fstab file looks like the following

-------------------------------------------------------------------------------
<file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0

/dev/sda5 / ext3 errors=remount-ro 0 1

/dev/sda7 /data ext3 defaults 0 2

/dev/sda9 /win_small vfat defaults 0 0

/dev/sda10 /win_big vfat defaults 0 0

/dev/sda6 none swap sw 0 0

/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0

----------------------------------------------------------------------------------

I typed "id" in the terminal and got three different ids for three different users

root - 0
sid - 1000
bunty - 1001

I want to write and save to files in the fat partition using any of these users. Is it possible?? Also the "0" in the fstab file --- do they mean the permission for only root?? please clarify

User avatar
Rolling Stone
Posts: 366
Joined: 2009-02-15 18:55
Location: Turku, Finland

Re: partitions permission query

#4 Post by Rolling Stone »

Code: Select all

man fstab

Code: Select all

man mount
It's all right there. Think of it as an entry level test.

User avatar
sunrat
Administrator
Administrator
Posts: 6463
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 473 times

Re: partitions permission query

#5 Post by sunrat »

The answers you seek are indeed in the man pages RollingStone posted.
I'll give you a little more help. If you need rw access for more than one user, the options users and rw will be useful instead of defaults.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply