Click to See Complete Forum and Search --> : Mount hard-drive with propper permissions.


templest
01-19-2005, 06:53 PM
I installed slackware on this machine that has two hard-drives. Before installing slack I backed up my stuff onto the second hard-drive. When installing slack it asked me if it wanted to mount and detect the thing at startup and I hit yes. But it's mounting the drive as read-only, hence, it's useless for anything other than copying stuff from and not to. I played around a bit with chmod and umask but I couldn't fix the permissions to read/write. (It's an NTFS partition, btw).

Ideas? Thanks. :)

bwkaz
01-19-2005, 07:39 PM
Originally posted by templest
(It's an NTFS partition, btw). There's the problem. ;)

The Linux NTFS driver is, by default, read-only. The reason is that it can't reliably write to NTFS partitions.

Depending on your kernel, your driver might be able to successfully write to files IF AND ONLY IF the size does NOT change, or it might just be highly unstable. Regardless of kernel version, NTFS write support is considered highly experimental, and won't enable itself in your kernel's configuration unless you specifically ask for it (by turning on the "yes, prompt me about experimental stuff" setting along with acknowledging the "yes, I realize NTFS write support is probably buggy" bit on the setting itself).

I think there's at least one driver that uses the native Windows NTFS filesystem driver to do the work, but I'm not sure what it's called or how well it works. (captive-ntfs perhaps?)

templest
01-19-2005, 08:51 PM
er... format time. Going to transfer files to other computer through router and then make it an ext3. Thanks.

soulestream
01-20-2005, 01:45 AM
bwkaz


i may be wrong but when i did my last kernel compile i seem to remember that NTFS write isnt marked experimental in 2.6.10. not sure though. i keep everything fat32 to be on the safe side.





soule

templest
01-20-2005, 06:42 PM
Okay, I did what I said above and now I have another problem regarding the same thing. I mounted the HD and everything (it's now an ext3 partition). Problem is, only root has write access/exec rights on it. Meaning, my regular user (templest) can't do anything but a "dir" on the drive's contents. I typed:

chmod 751 /backup
umask 777 /backup

But the permissions don't seem to change. I loaded KDE (It comes in handy for times like this when I get lost in the console) and when I tried to change the permissions with the graphical settings it says:

"Changing the Attributes of files is not supported with protocol devices"

help? :(

bwkaz
01-20-2005, 07:21 PM
Originally posted by templest
umask 777 /backup Uhh, the umask is a global setting. It is not per filesystem. ;)

What do you get when you:

ls -ld /backup
ls -l /backup

?

templest
01-20-2005, 08:05 PM
sh-2.05b$ ls -ld /backup/
drwxr-x--x 4 root root 4096 2005-01-20 17:28 /backup/
sh-2.05b$ ls -l /backup/
total 8
drwxr-xr-x 2 root root 4096 2005-01-20 17:28 CyberPunk_Prods
drwxr-xr-x 37 root root 4096 2005-01-20 17:12 bak
sh-2.05b$

bwkaz
01-21-2005, 07:34 PM
If you want your user to have full access to the entire subdirectory:

chown --recursive yourusername:yourgroup /backup

You should probably also:

find /backup -type d -exec chmod 0755 {} \;

(or at least chmod 0755 /backup) so that the directories all have the same permission (755 is rwx for user, rx for group, rx for other). Right now, it looks like the permissions are different for /backup versus its subdirectories.

templest
01-22-2005, 12:58 PM
would you believe me if I told you those commands froze the computer?

Fell asleep yesterday at four and woke up at eight today. left box on all night with war3 running and this morning box was frozen. it's been glitchy ever since. starting to wonder if it's starting to wear out.

rofl, it wouldn't even start up. had to put this one stand-less fan under the desk and opened the side-panel of the box and now it's working (but glitchy)... maybe it's just too over-heated. the cpu fan -was- on low all night. :-/ *ponders*

Going to leave it off while tending to other things and try it again later in the afternoon, once it's had a chance to cool off.

I'll get back to you on that. But from what I can tell, those commands just change the permissions of the files and folders within the HD, so does that mean that every time I want to put a new folder in root, it'll have to be made with root and those commands run again?

bwkaz
01-22-2005, 05:39 PM
Originally posted by templest
would you believe me if I told you those commands froze the computer? No, I wouldn't, actually. :D

Are you sure you didn't mistype anything there? Because I just did something very similar to give myself some scratch space to play with SPECviewperf (see this (http://www.justlinux.com/forum/showthread.php?s=&threadid=137229) thread for what I found out, especially the part about it requiring 1.4 gigs of space; my home directory didn't have that much free, initially) in a new partition mounted on /scratch, and it didn't freeze up my system...

I'll get back to you on that. But from what I can tell, those commands just change the permissions of the files and folders within the HD Well, files and directories, but yes.

, so does that mean that every time I want to put a new folder in root, it'll have to be made with root and those commands run again? Every time you want a new directory in the root directory. But yes.

The reason is that making a new directory in / is not really supposed to ever happen, except with the explicit help of root (and obviously, root is going to need to know about it). That's why no other user has write permission to / by default. To put it another way, creating a /backup directory is not something that should be done lightly.