LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-22-2006, 12:50 PM   #16
snowtigger
Member
 
Registered: Mar 2005
Location: england
Distribution: slackware, win2k
Posts: 364

Rep: Reputation: 35

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.

 
Old 01-23-2006, 12:44 AM   #17
NikToo
Member
 
Registered: Nov 2005
Distribution: SUSE 10
Posts: 41

Original Poster
Rep: Reputation: 15
Fantastic, thanks. That's solved it all.
 
Old 01-25-2006, 08:18 AM   #18
NikToo
Member
 
Registered: Nov 2005
Distribution: SUSE 10
Posts: 41

Original Poster
Rep: Reputation: 15
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.
 
Old 01-25-2006, 10:02 AM   #19
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by NikToo
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.
 
Old 01-25-2006, 10:26 AM   #20
NikToo
Member
 
Registered: Nov 2005
Distribution: SUSE 10
Posts: 41

Original Poster
Rep: Reputation: 15
Thanks, that's actually solved it. What does the ro and umask=0222 do that it didn't previously do?
 
Old 01-25-2006, 11:13 AM   #21
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
"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! ;-)
 
Old 01-25-2006, 01:43 PM   #22
dmartins
Member
 
Registered: Oct 2005
Location: Ontario, Canada
Distribution: Arch, Gentoo
Posts: 98

Rep: Reputation: 15
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.
 
Old 01-25-2006, 02:00 PM   #23
NikToo
Member
 
Registered: Nov 2005
Distribution: SUSE 10
Posts: 41

Original Poster
Rep: Reputation: 15
Aha... So like a hotswappable hard drive?

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.
 
Old 01-26-2006, 05:57 AM   #24
NikToo
Member
 
Registered: Nov 2005
Distribution: SUSE 10
Posts: 41

Original Poster
Rep: Reputation: 15
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.

Now to put my mail folder on it...
 
  


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
lost windows xp boot ardent Linux - Newbie 17 05-27-2006 01:32 AM
I've reinstalled windows and lost mdk 9.2 on my PC lumikko Linux - General 6 03-12-2004 03:50 PM
I lost windows aleli Mandriva 6 09-30-2003 06:28 PM
Lost Windows Partition? Unifex Linux - Newbie 7 03-20-2003 04:08 PM
Lost my WIndows with LILO quwiltw Linux - Software 4 04-24-2002 06:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:56 AM.

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
Open Source Consulting | Domain Registration