Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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.
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.
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
/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)
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
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 .