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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just mounted ntfs partitions shown below.
gibby@linux:~> mount
/dev/hda3 on / type reiserfs (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda1 on /windows/c type ntfs (ro,noexec,nosuid,nodev)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/hda1 on /windows/d type ntfs (ro)
now i can't access them. it is saying i don't have permission.
and their folders are locked.
/dev/sda1 on /windows/c type ntfs (ro,noexec,nosuid,nodev)
why noexec, nosuid, nodev? I'm not an ntfs-guru but sounds odd to me..also, I'd use "users" as an option, so others than the mounter (who might be root) can do stuff with the mounted partitions, like
/dev/sda1 on /windows/c type ntfs (users,exec)
or so..that locked-thing sounds to me, that you have mounted the partitions as some other user (say, as root) and then try to access them as some other (normal) user, who doesn't have even read permissions.
why noexec, nosuid, nodev? I'm not an ntfs-guru but sounds odd to me
Seems perfectly normal - NTFS can't have character or block devices so nodev stops any files being interpreted as such, same with setuid - NTFS has no such thing and unless you're using WINE to execute Windows apps there's no harm in noexec as well (noexec is a good default on all mounted file systems besides root for security reasons).
Quote:
/dev/sda1 on /windows/c type ntfs (users,exec)
Don't remove the 'ro' (read only) option from NTFS mounts. Linux doesn't yet have NTFS write support which means that if you did actually try and write to an NTFS partition it would corrupt it and you'd lose your data. I'm not sure if removing ro will actually allow you to try and write to it (probably the underlying driver has that functionality disabled or not compiled in) but its not worth taking the risk. The users thing will control who can mount and umount the partition but not the permissions on it when it is mounted.
If you look in man mount and look in the NTFS section you'll see all the options explained there, including this:
Quote:
uid=value, gid=value and umask=value
Set the file permission on the filesystem. The umask value is
given in octal. By default, the files are owned by root and not
readable by somebody else. The umask value is given in octal.
# mount -t ntfs -o user,noexec,suid,uid=500,gid=500,umask=227 /dev/sda1 /windows/c -r
# mount -t ntfs -o user,noexec,suid,uid=500,gid=500,umask=227 /dev/hda1 /windows/d -r
here is this now,
/dev/hda3 on / type reiserfs (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /windows/c type ntfs (ro,noexec,nodev,uid=500,gid=500,umask=227)
/dev/hda1 on /windows/d type ntfs (ro,noexec,nodev,uid=500,gid=500,umask=227)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.