21.09.2014, 16:29 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]

Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
Autor Nachricht
ryancw
Titel: what permissions for a mount point?  BeitragVerfasst am: 01.01.2009, 15:37 Uhr



Anmeldung: 20. Mar 2008
Beiträge: 29

I have two 500-G hard-drives inside my computer. The only one I'm currently using is sda.
sda1: windows XP
sda2: Kanotix
sda3: home

I want to use the other hard drive, sdb, to back up my /home. Originally it contained a single ntfs partition, occupying the entire 500G. I repartitioned it to two 250G sections, with sdb1 the ntfs part, and sdb2 formatted as ext3. The sdb1 already had a mount point in fstab, called /media/sdb1, and it would mount OK. So I created a mount point in fstab for /dev/sdb2, called it /media/sdb2, and made it rw,users,noauto. I created that as root.

sdb2 now mounts OK, but users cannot write to sdb2, I guess because root is the owner of /media/sdb2? How should I make the permissions such that users can read and write to sdb2, my new backup place? Or is this inadvisable?

Thanks.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Kano
Titel: what permissions for a mount point?  BeitragVerfasst am: 01.01.2009, 16:42 Uhr



Anmeldung: 17. Dez 2003
Beiträge: 16252

its not the problem of the mountpoint, but the ext3 partition stores the owner, so you can do for example:

chown 1000:1000 -R /media/sdb2

when you only use the default user.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
ryancw
Titel: Re: what permissions for a mount point?  BeitragVerfasst am: 01.01.2009, 17:07 Uhr



Anmeldung: 20. Mar 2008
Beiträge: 29

Let me see if I understand correctly. This command will change the ownership of all files on /media/sdb2 to whatever user is currently logged on (and being a home computer, there is only one user at a time).

If I have that right, are those changes permanent? Meaning, say I backup my entire /home to sdb2. A lot of files. From 4 different users. From now on, whoever logs on and mounts /media/sdb2 can act like the owner of all those files?

Kano hat folgendes geschrieben::
its not the problem of the mountpoint, but the ext3 partition stores the owner, so you can do for example:

chown 1000:1000 -R /media/sdb2

when you only use the default user.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Kano
Titel: Re: what permissions for a mount point?  BeitragVerfasst am: 01.01.2009, 17:40 Uhr



Anmeldung: 17. Dez 2003
Beiträge: 16252

You should not do that with different users, thats the way for one user, for differnet ones you do

chmod 777 -R /media/sdb5
find /media/sdb5 -type f -exec chmod 666 {} \;

That makes all files world writeable, the 2nd command removes the execute flag - as that is not usefull for data files. I do not like that variant much however.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
ryancw
Titel: Re: what permissions for a mount point?  BeitragVerfasst am: 02.01.2009, 17:41 Uhr



Anmeldung: 20. Mar 2008
Beiträge: 29

Thanks Kano. In the end, I just left things as they were: only root can copy /home (which contains 5 users' home files) to /media/sdb2. That should be sufficient, and maybe better, since the individual users probably don't need to be messing with backups anyway. I backed it up last night as root, and it worked fine.

Kano hat folgendes geschrieben::
You should not do that with different users, thats the way for one user, for differnet ones you do

chmod 777 -R /media/sdb5
find /media/sdb5 -type f -exec chmod 666 {} \;

That makes all files world writeable, the 2nd command removes the execute flag - as that is not usefull for data files. I do not like that variant much however.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Kano
Titel: Re: what permissions for a mount point?  BeitragVerfasst am: 02.01.2009, 20:28 Uhr



Anmeldung: 17. Dez 2003
Beiträge: 16252

Usually you mount that then to /home, maybe renameing /home as /home.old and creating a new /home dir. Don't do that while you are in KDE, logout and do that as root in a text console. Then you can change /etc/fstab.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Beiträge vom vorherigen Thema anzeigen:     
Gehe zu:  
Alle Zeiten sind GMT + 1 Stunde
Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
PNphpBB2 © 2003-2007 
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.