LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   permisions problem (https://www.linuxquestions.org/questions/linux-newbie-8/permisions-problem-534402/)

nnjond 03-04-2007 03:23 AM

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

Simon Bridge 03-04-2007 03:28 AM

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.

nnjond 03-04-2007 03:44 AM

I believe hdb5 is mounted via fstab. I'm not sure what that means yet? How should i add permisions to fstab line ?

pixellany 03-04-2007 07:20 AM

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.

jschiwal 03-04-2007 07:49 AM

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.

Simon Bridge 03-04-2007 02:47 PM

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.

nnjond 03-05-2007 02:33 AM

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:~$

timmeke 03-05-2007 04:22 AM

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?

nnjond 03-05-2007 06:13 PM

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.

timmeke 03-06-2007 01:33 AM

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?

nnjond 03-06-2007 02:29 AM

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.

Simon Bridge 03-06-2007 06:46 PM

/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

nnjond 03-07-2007 05:02 AM

“/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?

timmeke 03-07-2007 05:14 AM

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.

nnjond 03-07-2007 05:51 AM

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 ?


All times are GMT -5. The time now is 01:02 AM.