FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-05-2008, 10:54 AM
dave N
 
Default chown all files on a data drive

I used to run Fedora and now all the files on my data drives are uid 500 and gid 500. * As root I've set the permissions for the drive (loaded under /share/other) to be owned by root but the group to be users.* this didn't get recursively filtered down. * Now under Debian the same user name and password I'd previously had are uid 1000 and gid 1000. Though I can access the files on the drive I can't do anything with them except as root. * How can I rectify this? chown -R 1000:1000? * This'll cause problems with the lost+found as well as any .Trash folders, should I then change the uids and gids back? * Thanks * Dave
 
Old 01-05-2008, 02:13 PM
"Chris Howie"
 
Default chown all files on a data drive

(Sorry if you get this twice Dave, I didn't reply to the list.* Second time I've done that today... sigh...)

On Jan 5, 2008 6:54 AM, dave N <
drn_temp2@rogers.com> wrote:
I used to run Fedora and now all the files on my data drives are uid 500 and gid 500.
* As root I've set the permissions for the drive (loaded under /share/other) to be owned by root but the group to be users.* this didn't get recursively filtered down. *
Now under Debian the same user name and password I'd previously had are uid 1000 and gid 1000. Though I can access the files on the drive I can't do anything with them except as root. *
How can I rectify this? chown -R 1000:1000? * This'll cause problems with the lost+found as well as any .Trash folders, should I then change the uids and gids back?

I'm not sure exactly what you're trying to accomplish.* If you want
everyone to have access to the drive you can do something like:

# chown -R root:root /share/other
# chmod -R o+rwX /share/other


If you only want your user account to have access then something like:

# chown -R youruser /share/other
# chown root:root /share/other
# chown root:root /share/other/lost+found

--
Chris Howie

http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers
 
Old 01-05-2008, 02:52 PM
dave N
 
Default chown all files on a data drive

Chris Howie <cdhowie@gmail.com> wrote: On Jan 5, 2008 6:54 AM, dave N < drn_temp2@rogers.com> wrote:
I used to run Fedora and now all the files on my data drives are uid 500 and gid 500. * As root I've set the permissions for the drive (loaded under /share/other) to be owned by root but the group to be users.* this didn't get recursively filtered down. * Now under Debian the same user name and password I'd previously had are uid 1000 and gid 1000. Though I can access the files on the drive I can't do anything with them except as root. * How can I rectify
this? chown -R 1000:1000? * This'll cause problems with the lost+found as well as any .Trash folders, should I then change the uids and gids back?
I'm not sure exactly what you're trying to accomplish.* If you want everyone to have access to the drive you can do something like:

# chown -R root:root /share/other
# chmod -R o+rwX /share/other

If you only want your user account to have access then something like:

# chown -R youruser /share/other
# chown root:root /share/other
# chown root:root /share/other/lost+found

Chris Howie*
Thanks Chris. * Why would I leave the owner and group of all of the files and folders as root? Why not root:users? Should the lost+found remain root:root and u -rw g-rw. * There aren't many / any executable files so I'm not too worried about playing with the execute
bit. * This is only a single user machine but I have another that I am switching over to Debian which will have a couple users, same group, and access to the same files. * Dave
 
Old 01-05-2008, 09:18 PM
Cameron Hutchison
 
Default chown all files on a data drive

dave N <drn_temp2@rogers.com> wrote:

>I used to run Fedora and now all the files on my data drives are uid
>500 and gid 500.
>
>Now under Debian the same user name and password I'd previously had
>are uid 1000 and gid 1000. Though I can access the files on the drive
>I can't do anything with them except as root.
>
>How can I rectify this? chown -R 1000:1000?
>
>This'll cause problems with the lost+found as well as any .Trash
>folders, should I then change the uids and gids back?

chown -R will work, but may be a little too indiscriminate.

You can be more discriminating by find(1) and only changing the UID of
files that are 500, and a GID of 500.

$ find /path -uid 500 -print0 | xargs -0 chown 1000
$ find /path -gid 500 -print0 | xargs -0 chgrp 1000

You can combine all this into one command if all files with UID 500 also
have a GID of 500, but if not, the above is safer leaving you to remap
other IDs as you need to.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-05-2008, 11:19 PM
Alex Samad
 
Default chown all files on a data drive

On Sun, Jan 06, 2008 at 09:18:16AM +1100, Cameron Hutchison wrote:
> dave N <drn_temp2@rogers.com> wrote:
>
> >I used to run Fedora and now all the files on my data drives are uid
> >500 and gid 500.
> >
> >Now under Debian the same user name and password I'd previously had
> >are uid 1000 and gid 1000. Though I can access the files on the drive
> >I can't do anything with them except as root.
> >
> >How can I rectify this? chown -R 1000:1000?
> >
> >This'll cause problems with the lost+found as well as any .Trash
> >folders, should I then change the uids and gids back?
>
> chown -R will work, but may be a little too indiscriminate.
>
> You can be more discriminating by find(1) and only changing the UID of
> files that are 500, and a GID of 500.
>
> $ find /path -uid 500 -print0 | xargs -0 chown 1000
> $ find /path -gid 500 -print0 | xargs -0 chgrp 1000

why not

$ find /path -uid 500 -exec chmod 1000 "{}" ;


I guess you will get 1 process for each file as it spawns it off ?

>
> You can combine all this into one command if all files with UID 500 also
> have a GID of 500, but if not, the above is safer leaving you to remap
> other IDs as you need to.
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
 
Old 01-13-2008, 12:53 PM
 
Default chown all files on a data drive

----- Original Message -----
From: "Alex Samad" <alex@samad.com.au> Sent: Saturday, January 05, 2008 7:19
PM


On Sun, Jan 06, 2008 at 09:18:16AM +1100, Cameron Hutchison wrote:

dave N <drn_temp2@rogers.com> wrote:

>I used to run Fedora and now all the files on my data drives are uid
>500 and gid 500.
>
>Now under Debian the same user name and password I'd previously had
>are uid 1000 and gid 1000. Though I can access the files on the drive
>I can't do anything with them except as root.
>
>How can I rectify this? chown -R 1000:1000?
>
>This'll cause problems with the lost+found as well as any .Trash
>folders, should I then change the uids and gids back?

chown -R will work, but may be a little too indiscriminate.

You can be more discriminating by find(1) and only changing the UID of
files that are 500, and a GID of 500.

$ find /path -uid 500 -print0 | xargs -0 chown 1000
$ find /path -gid 500 -print0 | xargs -0 chgrp 1000


why not

$ find /path -uid 500 -exec chmod 1000 "{}" ;


I guess you will get 1 process for each file as it spawns it off ?



You can combine all this into one command if all files with UID 500 also
have a GID of 500, but if not, the above is safer leaving you to remap
other IDs as you need to.


I've tried the chown & chmod solution (not the more eloquent above) to a
small set of folders and files for a test


I'm not sure exactly what you're trying to accomplish. If you want
everyone to have access to the drive you can do something like:



# chown -R root:root /share/other
# chmod -R o+rwX /share/other


I can access the files but not delete, etc. I've even tried changing the
group to users and adding myself to the users group (100). Still can delete
the files and it isn't apparent if I can otherwise modify files. Generally
all files are now root:users -rw-rw-rw. I used to run SELinux which adds a
whole bunch of other things to files, if the current Etch kernel is SELinux
aware, could this be causing my problems?


Also, with Gnome Nautilus permissions, it doesn't do recursive changes, is
there some way to get the recursive changes?




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 10:06 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org