kanotix.com

Installation - I want to add a hard drive to a home user is this possible

spottyrover - 18.05.2006, 06:42 Uhr
Titel: I want to add a hard drive to a home user is this possible
Hi all
I want to add a hard drive to the home user
1- can I just make a directory called movies eg /home/david(user)/movies and just place a line in fstab eg./dev/hdb5 /home/david/movies ext3 defaults 0 0
2- how do I allow user david full access to this drive?

thanks for your help
David
mzilikazi - 18.05.2006, 12:58 Uhr
Titel: I want to add a hard drive to a home user is this possible
1) Yes.

2) Something like so:
Code:
/dev/hdb5      /home/david/movies  reiserfs auto,rw,users        0       0

spottyrover - 19.05.2006, 09:19 Uhr
Titel: RE: I want to add a hard drive to a home user is this possib
Mzilikazi I can write to it but only in root user mode
when I do a ls -l so the permissions are listed it looks the same to me as all of the other directories that I can write to
So any other ideas would be appreciated

thanks
Dave
Roughnecks - 19.05.2006, 11:05 Uhr
Titel: RE: I want to add a hard drive to a home user is this possib
please post your /etc/fstab here.

also check wether /home/david/movies is owned by david. you can check and alter the owner with konqueror, or just type (as root):
"chown david:david /home/david/movies"
slh - 19.05.2006, 12:34 Uhr
Titel: RE: I want to add a hard drive to a home user is this possib
chown -R <user>:<user> /home/<user>
spottyrover - 19.05.2006, 15:17 Uhr
Titel: RE: I want to add a hard drive to a home user is this possib
I have been surfing the net and have found some info which seems to match what you guys have suggested but nothing seems to work so far
here is what I tried and the result

root@KanotixBox:/home/david# chmod 0777 movies
root@KanotixBox:/home/david# ls -l
drwxr-xr-x 18 root root 4096 Jan 1 1970 movies

root@KanotixBox:/home/david# chown david movies
chown: changing ownership of `movies': Operation not permitted

root@KanotixBox:/home/david# chgrp david movies
chgrp: changing group of `movies': Operation not permitted
root@KanotixBox:/home/david# ls -l
drwxr-xr-x 18 root root 4096 Jan 1 1970 movies

root@KanotixBox:/home/david# chmod +rwxrwxrwx movies
root@KanotixBox:/home/david# ls -l
drwxr-xr-x 18 root root 4096 Jan 1 1970 movies

root@KanotixBox:/home/david# chmod -R +rwxrwxrwx movies
root@KanotixBox:/home/david# ls -l
drwxr-xr-x 18 root root 4096 Jan 1 1970 movies

root@KanotixBox:/home/david# chown -R root:david /home/david/movies
chown: changing ownership of `/home/david/movies': Operation not permitted

root@KanotixBox:/home/david# chown -R david:david /home/david/movies
chown: changing ownership of `/home/david/movies': Operation not permitted

my fstab file is
/dev/hdb7 /home/david/movies vfat auto,rw,users 0 0

I am so confused I will try anthig

thanks for all of your help

Dave
stryder - 19.05.2006, 15:35 Uhr
Titel:
Well, the key is that your partition is vfat. So umount /home/david/movies first. Then change your fstab to:

Code:
/dev/hdb7  /home/david/movies        vfat defaults,rw,gid=david,umask=002     0      0


Before you mount again, do the chown/chgrp -R thing on the folder /home/david/movies

mount the partition and you should be good to go.

Vfat is a format that does not have the facility for permissions and that is why you need a mask so that the system will use the permissions/ownership that the mask imposes. Gid sets the group id. I think there is one to set the ownerid but I don't use that. The umask sets the permissions with others not having permission to write. For full permissions for everybody, use umask=000.
schnorrer - 20.05.2006, 01:39 Uhr
Titel:
spottyrover wit chmod 777 on adirektory is gone always wrong. becaus t 7 stands for RWX and a directory cant be executable.
660 is that, what you have to write for permisions far a directory

wrong: chmod 0777 movies
Rigjht: chmod 0660 movies # movies is a Direktory

Right chmod 066 movies/film.avi # because film. avi is a file

right chmod 0777 movies/startfilm.sh # because startfilm.sh ia a executable file
spottyrover - 21.05.2006, 03:57 Uhr
Titel:
I have changed the fstab to /dev/hdb7 /home/david/movies vfat defaults,rw,uid=david,gid=david,umask=002 0 0
and have got the drive to be set to drwxrwxr-x 18 david david 4096 Jan 1 1970 movies
but I still can not write to it as a user david

I just tried chmod 0660 movies but that made no difference either I still can not write to it

I just checked a directory where I can write to it and I get
drwxr-xr-x 2 david david 144 May 21 12:00 TV
which now has me confused
as I assumed it was a permission problem but now it does not seem so

any other ideas would be appreciated
Dave
stryder - 21.05.2006, 07:27 Uhr
Titel:
Well, I am just as stumped because the settings I gave you are settings I use. The only difference is that I mount it in a folder in /. I suppose you have to make sure that the partition is writable. Simplest, I think, would be to see if you can write as root. If not it can't be a permissions problem. If that partition is empty, I would try reformatting then mounting again.
spottyrover - 21.05.2006, 09:51 Uhr
Titel:
I could write as root before and as a root user in the david user login by using filemanager su mode
( I have not tried it now because my friend gave me a large drive and we are in the middle of finishing the install)
so now the issue is a learnig thing as I will probably need it on my older cpu
thanks for the help everyone
dave

ps I am using kano 2005-4 version
datebro - 25.05.2006, 10:38 Uhr
Titel:
btw.:
Zitat:
directory cant be executable
did you ever try to cd into a directory without the x-flag?

Greetings
Datebro
Alle Zeiten sind GMT + 1 Stunde
PNphpBB2 © 2003-2007