LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-04-2007, 04:23 AM   #1
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Rep: Reputation: 31
permisions problem


i have a duel boot. My data is on an aux disc, ((hdb5), which i can acces in Windows), but the permisions tabs on these directories are all greyed out so i can't write to them and i am informed;

"You are not the owner, so you can't change these permisions"

How can i change these permisions ?
Edit/Delete Message
 
Old 03-04-2007, 04:28 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
How is hdb5 mounted?

cat /etc/fstab (post the content)

You can change the ownership with the chown command and the permissions with the chmod command. Use each on the mountpoint. But if the hdb5 is mounted via fstab, the best way, then you can add user and permissions to the fstab line.
 
Old 03-04-2007, 04:44 AM   #3
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
I believe hdb5 is mounted via fstab. I'm not sure what that means yet? How should i add permisions to fstab line ?
 
Old 03-04-2007, 08:20 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
fstab controls what gets mounted and how. One of the fields controls the read-write mode. Here are some examples:
Code:
/dev/sdb1 /home/data ext3 defaults 0 0
/dev/cdrom /media/cdrom iso9660,udf noauto,users,exec,ro 0 0
/dev/fd0 /media/floppy vfat,ext2 noauto,users,exec,rw 0 0
In the first line, the options are set to "defaults" which includes mounting read-write. The cdrom is mounted read-only, and the floppy is mounted read-write.
"man fstab" for details fo the format and options.
 
Old 03-04-2007, 08:49 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Use the mount command by itself to display how the partition is mounted. You didn't indicate what filesystem you are using on hdb5. If it is fat32, then you change the permissions on the entire partition by using certain mount options. The type is vfat. Use the uid,gid,fmask and dmask options to change the ownership and permissions. The chmod command will not work.

( Note, on some systems, udev and hotplug is used enabling you to insert a usb drive and mount it as a user ).

If the partition uses the NTFS filesystem, it normally is only readonly. However you can install "fuse" and "ntfsprogs", "ntfsprogs-fuse" or "ntfs-3g" and use them to mount the partition. This will give you rw access to an NTFS formatted partition.

Another possibility is that the filesystem was mounted read-only because the filesystem is corrupt.
 
Old 03-04-2007, 03:47 PM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
nnjond: I cannot help without more information.
In terminal, enter

cat /etc/fstab

Copy the command and all the output, then paste all that to your reply.

Do the same for the command

mount

If there is some reason you are unwilling to do this, then you are stuck reading the man pages for fstab, mount and so on.
 
Old 03-05-2007, 03:33 AM   #7
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
Thanx for all the help so far.
I want Permision to rw hdb5. The prob is revealed somewhere below...

nnjond@nnjond-desktop:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda5 / ext3 defaults,errors=remount-ro 0 1
/dev/hda6 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto
/dev/hdb5 /media/hdb5 vfat rw,defaults,user,gid=1000,umask=0222 0 0 0
nnjond@nnjond-desktop:~$ mount
/dev/hda5 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
varrun on /var/run type tmpfs (rw)
varlock on /var/lock type tmpfs (rw)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
devshm on /dev/shm type tmpfs (rw)
lrm on /lib/modules/2.6.15-28-386/volatile type tmpfs (rw)
/dev/hdb5 on /media/hdb5 type vfat (rw,noexec,nosuid,nodev,gid=1000,umask=0222)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sda1 on /media/usbdisk type vfat (rw,nosuid,nodev,quiet,shortname=mixed,uid=1000,gid=1000,umask=077,iocharset=utf8)
nnjond@nnjond-desktop:~$
 
Old 03-05-2007, 05:22 AM   #8
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
hdb5 does indeed contain a FAT partition.
FAT does not support file permissions, so you can't really change the permissions (either via chmod or via the graphical interface, as you've tried).

You do have read-write access, so you can add/delete/move files on hdb5. chmod and chown will not work though.

So, please give us an idea as to why you want to change the permissions?
 
Old 03-05-2007, 07:13 PM   #9
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
Thanks for your cont. interest.

I can view properties, permisions via the hdb5 icon on my dsktp. the option boxes are greyed out while none of the writes are ticked.

i cannot write to, or delete the contents.
 
Old 03-06-2007, 02:33 AM   #10
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
The umask makes any newly created files or directories non-writable. So, remount using either a umask of 0000 or, alternatively, a dmask of 0000 and an fmask of 0222.

Are you member of the group with id 1000.

Or is there some reason why these options are explicitly put into /etc/fstab?
 
Old 03-06-2007, 03:29 AM   #11
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
The umask makes any newly created files or directories non-writable. So, remount using either a umask of 0000 or, alternatively, a dmask of 0000 and an fmask of 0222.
"

I will attemtp some research of this statement before i bother u again.


I am not a member of 1000 as far as i know.

I don't know why said options are explicitly put in to /etc/fstab unless i was following earlier advice.
 
Old 03-06-2007, 07:46 PM   #12
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
/dev/hdb5 /media/hdb5 vfat rw,defaults,user,gid=1000,umask=0222 0 0 0

gid=1000 is useless uless you are a member of the group with id 1000.
the permission options are greyed out because you cannot alter them.
use ls -l to check the permissions.

You probably want rw,user,auto,umask=0000

Try with the mount command:

umount /media/hdb5
mount -t vfat /dev/hdb5 /media/hdb5 -o rw umask=0000
 
Old 03-07-2007, 06:02 AM   #13
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
/dev/hdb5 /media/hdb5 vfat rw,defaults,user,gid=1000,umask=0222 0 0 0

gid=1000 is useless uless you are a member of the group with id 1000.
the permission options are greyed out because you cannot alter them.
use ls -l to check the permissions.

You probably want rw,user,auto,umask=0000


Too green to understand the essential of the above.

sudo umount /media/hdb5

seems to have worked; then

nnjond@nnjond-desktop:~$ sudo mount -t vfat /dev/hdb5 /media/hdb5 -o rw umask=0000
Password:
Usage: mount -V : print version
mount -h : print this help
mount : list mounted filesystems
mount -l : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
mount -a [-t|-O] ... : mount all stuff from /etc/fstab
mount device : mount device at the known place
mount directory : mount known device here
mount -t type dev dir : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
mount --bind olddir newdir
or move a subtree:
mount --move olddir newdir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say man 8 mount .
nnjond@nnjond-desktop:~$


Sorry i don't know where to go from here?
 
Old 03-07-2007, 06:14 AM   #14
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
According to "man 8 mount" (as mentionned), the -o <options> need to go before the mounted filesystem and the mountpoint. So the correct syntax should be:
Code:
sudo mount -t vfat -o rw,umask=0000 /dev/hdb5 /media/hdb5
Start off by mounting it via the "mount" command, then try to see if it works and if it does, make the changes to the mount options permanent by editing /etc/fstab.

Last edited by timmeke; 03-07-2007 at 06:16 AM.
 
Old 03-07-2007, 06:51 AM   #15
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
Great Success! Thankyou!


" make the changes to the mount options permanent by editing /etc/fstab."

Please would u, just to be safe, explain how to edit fstab ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problem changing file permisions alaios Linux - General 8 01-25-2006 01:28 PM
howto chowto change file permisions in multiplhange file permisions in multiple dirs? pingvina Linux - Software 3 01-13-2006 04:10 PM
permisions charnel Linux - General 3 07-10-2005 03:53 PM
mysql permisions problem dvddecrypter Linux - Software 0 06-02-2004 09:33 PM
Permisions ToeShot Linux - General 2 11-30-2001 01:53 AM


All times are GMT -5. The time now is 08:40 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration