Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
Depending on what kernel you are running you may not get write access to an NTFS partition.
NTFS is not a native format to linux. It is possible to write to it and work is being done to improve this, but it is still a bit flakey.
I think I spoke too soon. I can see windows/c as root, but when I go in as a user the folders are all locked. If I make one available, the subfolders don't change. Is there a way of changing them all?
I tried putting myself into the root group, but that didn't change anything.
I can see windows/c as root, but when I go in as a user the folders are all locked.
Change your /etc/fstab line from this:
Code:
dev/sda1 /windows/c auto defaults 0 0
to this:
Code:
dev/sda1 /windows/c auto ro,umask=0222 0 0
This will mount it as read-only for everyone, not just root. To make your fstab change effective you will have to remount the filesystem:
Code:
# umount /windows/c
# mount /windows/c
Make sure nobody is doing anything in that filesystem when you try to unmount it, otherwise you will get a "filesystem busy" error.
You can also remount a filesystem like this:
Code:
mount -o remount /windows/c
However, the remount option can cause some strange things to happen with SAMBA mounts, is not supported for some filesystem types, so I generically avoid it and just use umount followed by mount.
"ro" means mount it "read-only". This is probably what you want for an NTFS filesystem. I don't trust writing NTFS from Linux. It's still considered experimental. If it's a FAT32 filesystem. you can substitute "rw" for "read-write". Linux does just fine writing to FAT32.
"umask=0222" says make everything readable and executable (but not writeable) by everyone. Without the umask part, it would only be accessible by root (the userid that mounted it). This is what you ran into - root could see it, but others couldn't.
Read up on permissions, octal, and masking if the above is not understandable. "man umask" is a start, but will be pretty cryptic if you don't already know what it is talking about. Great manpage, huh?!
A high level overview is "set the umask to the opposite of the file permissions you want".
You want permissions (owner, group, other):
Code:
-r-xr-xr-x
and this maps to mode:
Code:
0555
which means you set your umask to "the opposite of" 0555, which is:
Code:
0222
This is only understandable if you understand that "octal 2" = "binary 010" and "octal 5" = "binary 101". Thus "0555" = "101101101" and "0222" = "010010010". Stacking the two binary representations "on top" of each other illustrates how they are "opposites" (one's become zero's, zero's become one's):
Code:
101101101
010010010
Either you already knew this and my explanation is silly, or it's way more than you ever wanted to know in the first place! ;-)
two other options that are useful, especially if they partition isn't mounted at boot are 'user' and 'users'
user lets any user mount the partition and only the same user (other than root) unmount it.
users lets any user mount the partition and any user unmount it.
again, only really useful if you have 'noauto' as well.
This is really useful, so thanks a lot. I'm a latecomer to the world of (proper) computing. When I had to choose my career path in the early 90s, computing wasn't all that great. The university courses still had punch card elements. So I went with Political Science... I kept up with computing on an enthusiast level, but never dwelwed deeper into it. Now I'm doing a part time course in Computing, and teaching myself Linux, so hopefully one day I'll have a proper career in computing (albeit almost 15 years late). So everything like this is very, very useful, and it's greatly appreciated.
Managed to create a FAT32 partition on my Windows drive, and then configured and mounted it successfully. I guess this is why I like Linux: once you get things to work it feels like a real achievement.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.