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 > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 05-30-2008, 08:37 PM
Robert Moskowitz
 
Default Setting Group owner of files on USB drive

I just got a 8Gb flash drive and went to copy a bunch of files onto it.
I wanted to perserve everything, so I just took my archiving rsync
command and altered it to go to localhost:/media/RALLY2/ (name of flash
drive). I am getting errors with changing the group owner. Huh?


So I try to just use mkdir to create a directory on the flash drive.
The directory has a group of root ???


So I try a chgrp and get:

[root@mine me]# chgrp me /media/RALLY2/Stuff
chgrp: changing group of `/media/RALLY2/Stuff': Operation not permitted


OK why can't I set the group to something other than root?

ls -lstr /media/
total 4
4 drwxr-xr-x 3 me root 4096 May 30 16:28 RALLY2

and of course for /media:

8 drwxr-xr-x 3 root root 4096 May 30 16:18 media




_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 05-30-2008, 08:39 PM
Matt Hyclak
 
Default Setting Group owner of files on USB drive

On Fri, May 30, 2008 at 04:37:58PM -0400, Robert Moskowitz enlightened us:
> I just got a 8Gb flash drive and went to copy a bunch of files onto it.
> I wanted to perserve everything, so I just took my archiving rsync
> command and altered it to go to localhost:/media/RALLY2/ (name of flash
> drive). I am getting errors with changing the group owner. Huh?
>
> So I try to just use mkdir to create a directory on the flash drive.
> The directory has a group of root ???
>
> So I try a chgrp and get:
>
> [root@mine me]# chgrp me /media/RALLY2/Stuff
> chgrp: changing group of `/media/RALLY2/Stuff': Operation not permitted
>
>
> OK why can't I set the group to something other than root?
>
> ls -lstr /media/
> total 4
> 4 drwxr-xr-x 3 me root 4096 May 30 16:28 RALLY2
>
> and of course for /media:
>
> 8 drwxr-xr-x 3 root root 4096 May 30 16:18 media
>

Most likely the device is formatted as FAT32, which has no concept of
permissions.

Reformat it, ignore the errors, or modify your rsync command to not preserve
uid/gid.

Matt

--
Matt Hyclak
Department of Mathematics
Department of Social Work
Ohio University
(740) 593-1263
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 05-30-2008, 09:09 PM
Scott Silva
 
Default Setting Group owner of files on USB drive

on 5-30-2008 1:39 PM Matt Hyclak spake the following:

On Fri, May 30, 2008 at 04:37:58PM -0400, Robert Moskowitz enlightened us:
I just got a 8Gb flash drive and went to copy a bunch of files onto it.
I wanted to perserve everything, so I just took my archiving rsync
command and altered it to go to localhost:/media/RALLY2/ (name of flash
drive). I am getting errors with changing the group owner. Huh?


So I try to just use mkdir to create a directory on the flash drive.
The directory has a group of root ???


So I try a chgrp and get:

[root@mine me]# chgrp me /media/RALLY2/Stuff
chgrp: changing group of `/media/RALLY2/Stuff': Operation not permitted


OK why can't I set the group to something other than root?

ls -lstr /media/
total 4
4 drwxr-xr-x 3 me root 4096 May 30 16:28 RALLY2

and of course for /media:

8 drwxr-xr-x 3 root root 4096 May 30 16:18 media



Most likely the device is formatted as FAT32, which has no concept of
permissions.

Reformat it, ignore the errors, or modify your rsync command to not preserve
uid/gid.

Matt

Or if you want to preserve permissions, you will need to use tar or some other
archiver.


--
MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 05-30-2008, 09:17 PM
Robert Moskowitz
 
Default Setting Group owner of files on USB drive

Matt Hyclak wrote:

On Fri, May 30, 2008 at 04:37:58PM -0400, Robert Moskowitz enlightened us:

I just got a 8Gb flash drive and went to copy a bunch of files onto it.
I wanted to perserve everything, so I just took my archiving rsync
command and altered it to go to localhost:/media/RALLY2/ (name of flash
drive). I am getting errors with changing the group owner. Huh?


So I try to just use mkdir to create a directory on the flash drive.
The directory has a group of root ???


So I try a chgrp and get:

[root@mine me]# chgrp me /media/RALLY2/Stuff
chgrp: changing group of `/media/RALLY2/Stuff': Operation not permitted


OK why can't I set the group to something other than root?

ls -lstr /media/
total 4
4 drwxr-xr-x 3 me root 4096 May 30 16:28 RALLY2

and of course for /media:

8 drwxr-xr-x 3 root root 4096 May 30 16:18 media




Most likely the device is formatted as FAT32, which has no concept of
permissions.

Reformat it, ignore the errors, or modify your rsync command to not preserve
uid/gid.

Unfortunately, I have to use it on Win systems as well...


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 05-30-2008, 09:39 PM
John R Pierce
 
Default Setting Group owner of files on USB drive

Robert Moskowitz wrote:

Unfortunately, I have to use it on Win systems as well...



then as someone else suggested, use tar.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 05-31-2008, 09:33 AM
Johnny Hughes
 
Default Setting Group owner of files on USB drive

Robert Moskowitz wrote:

Matt Hyclak wrote:
On Fri, May 30, 2008 at 04:37:58PM -0400, Robert Moskowitz enlightened
us:

I just got a 8Gb flash drive and went to copy a bunch of files onto
it. I wanted to perserve everything, so I just took my archiving
rsync command and altered it to go to localhost:/media/RALLY2/ (name
of flash drive). I am getting errors with changing the group owner.
Huh?


So I try to just use mkdir to create a directory on the flash drive.
The directory has a group of root ???


So I try a chgrp and get:

[root@mine me]# chgrp me /media/RALLY2/Stuff
chgrp: changing group of `/media/RALLY2/Stuff': Operation not permitted


OK why can't I set the group to something other than root?

ls -lstr /media/
total 4
4 drwxr-xr-x 3 me root 4096 May 30 16:28 RALLY2

and of course for /media:

8 drwxr-xr-x 3 root root 4096 May 30 16:18 media




Most likely the device is formatted as FAT32, which has no concept of
permissions.

Reformat it, ignore the errors, or modify your rsync command to not
preserve

uid/gid.

Unfortunately, I have to use it on Win systems as well...


You can't expect it to maintain ext3 file permissions in a FAT32
partition


you could use tar, but then the files are not available without untaring.

you MIGHT be able to also use acl permissions and getfacl/setfacl to
build a permissions file which you can use to reset the permissions and
still have the files available as normal files on the flash drive.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 05-31-2008, 01:23 PM
"Filipe Brandenburger"
 
Default Setting Group owner of files on USB drive

On Fri, May 30, 2008 at 4:37 PM, Robert Moskowitz <rgm@htt-consult.com> wrote:
> I am getting errors with changing the group owner. Huh?
>
> So I try to just use mkdir to create a directory on the flash drive. The
> directory has a group of root ???
>
> OK why can't I set the group to something other than root?

Because it's FAT.

If what you want is all the files on the same group, you may use mount
options to set that.

For example:

mount -o group=mygroup /dev/sdx1 /mnt/myusb

But if you want commands to change groups or permissions, you should
reformat the filesystem. If you need Windows interoperability, you
might want to try NTFS, I don't know if it works, but if you have the
device, the machines and the time for it, you might as well test it.

HTH,
Filipe
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 05-31-2008, 02:23 PM
Kenneth Burgener
 
Default Setting Group owner of files on USB drive

On 5/31/2008 3:33 AM, Johnny Hughes wrote:

Robert Moskowitz wrote:
You can't expect it to maintain ext3 file permissions in a FAT32
partition



Not necessarily. If the Linux files do not need to be accessed from the
windows environment, you could create an image file, format the image as
ext3, mount the image file as a loop device, and treat it as a standard
ext3 mount point.


# create a 10M empty file
dd if=/dev/zero of=disk.img bs=1024 count=10000

# format with ext3
mkfs.ext3 disk.img

# mount image
mkdir /mnt/mydata
mount -o loop disk.img /mnt/mydata

# read / write files
echo "hello world" > /mnt/mydata/hello.txt
ll /mnt/mydata


Kenneth
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-01-2008, 04:02 AM
Robert Moskowitz
 
Default Setting Group owner of files on USB drive

I want to thank you all for your comments and the knowledge I gained
thereby....


Kenneth Burgener wrote:

On 5/31/2008 3:33 AM, Johnny Hughes wrote:

Robert Moskowitz wrote:
You can't expect it to maintain ext3 file permissions in a FAT32
partition



Not necessarily. If the Linux files do not need to be accessed from
the windows environment, you could create an image file, format the
image as ext3, mount the image file as a loop device, and treat it as
a standard ext3 mount point.
Since this is only a movable copy of files from my /home/me directory
structure, I can live with loosing the group and needing to reset it if
moved back to a ext3 partition.


I will just have to work out the right rsync of cp command to do the
bulk movement without all those warnings. SHould only take reading a
few man pages for that...


Again thanks.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 02:48 AM.

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