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 > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 06-18-2012, 06:35 AM
Uwe Brauer
 
Default mount usb: same username different uid: problem

>> On Sat, 16 Jun 2012 19:19:42 +1000, Basil Chupin
>> <blchupin@iinet.net.au> wrote:

> On 16/06/12 00:00, Uwe Brauer wrote:
>>
>> Uwe Brauer

> You don't say which desktop environment you are using.

As I figured out it has nothing to do with the desktop environment.

> Nevertheless, I don't think that it is a matter of uid being 1000 or
> 1002 but PERMISSIONS, and who owns the USB device.
Well yes and no. The standard mount command mounts the USB
system (with a jfs file system) according to the uid, and
gid of the system!

There seems to be a patch for extX system which allows to
specify the uid and gid of the usb disc.
https://lwn.net/Articles/497106/
alas as far as I can seems not to be standard, yet.



> Mount the device and in a terminal as root - oops, Ubuntu doesn't have
> 'root' - that is, using "sudo" issue these 2 commands in sequence:

> sudo chown -R oub.users /dev/<USB-device> [ENTER]

> then

> sudo chmod -R u=rwx,g=rwm o= /dev/<USB-device> [ENTER]

Right but I consider this solution as being cumbersome
especially if there are a lot of files.

Another solution would be to use
sudo rsync

If rsync had an option to specify uid and gid on the target
system which I still don't know

Uwe Brauer


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-18-2012, 06:54 AM
Basil Chupin
 
Default mount usb: same username different uid: problem

On 18/06/12 16:35, Uwe Brauer wrote:

On Sat, 16 Jun 2012 19:19:42 +1000, Basil Chupin
<blchupin@iinet.net.au> wrote:

> On 16/06/12 00:00, Uwe Brauer wrote:
>>
>> Uwe Brauer

> You don't say which desktop environment you are using.

As I figured out it has nothing to do with the desktop environment.

> Nevertheless, I don't think that it is a matter of uid being 1000 or
> 1002 but PERMISSIONS, and who owns the USB device.
Well yes and no. The standard mount command mounts the USB
system (with a jfs file system) according to the uid, and
gid of the system!

There seems to be a patch for extX system which allows to
specify the uid and gid of the usb disc.
https://lwn.net/Articles/497106/
alas as far as I can seems not to be standard, yet.



> Mount the device and in a terminal as root - oops, Ubuntu doesn't have
> 'root' - that is, using "sudo" issue these 2 commands in sequence:

> sudo chown -R oub.users /dev/<USB-device> [ENTER]

> then

> sudo chmod -R u=rwx,g=rwm o= /dev/<USB-device> [ENTER]

Right but I consider this solution as being cumbersome
especially if there are a lot of files.


Right..."cumbersome"...

You only ever need to do it ONCE.

But then, you would know better - which is why you are asking for help
with the problem, right?


BC

--
Using openSUSE 12.1 x86_64 KDE 4.8.3 and kernel 3.4.2 on a system with-
AMD FX 8-core 3.6/4.2GHz processor
16GB PC14900/1866MHz Quad Channel Corsair "Vengeance" RAM
Gigabyte AMD3+ m/board; Gigabyte nVidia GTX550Ti 1GB DDR5 GPU


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-18-2012, 12:28 PM
Uwe Brauer
 
Default mount usb: same username different uid: problem

>> On Mon, 18 Jun 2012 16:54:30 +1000, Basil Chupin <blchupin@iinet.net.au> wrote:

> On 18/06/12 16:35, Uwe Brauer wrote:
>>>> On Sat, 16 Jun 2012 19:19:42 +1000, Basil Chupin
>>
>> > sudo chmod -R u=rwx,g=rwm o= /dev/<USB-device> [ENTER]
>>
>> Right but I consider this solution as being cumbersome
>> especially if there are a lot of files.

> Right..."cumbersome"...

> You only ever need to do it ONCE.

No. I need to do this every time I copy from

Laptop1-->USB-->Latop2

And then when I copy back

Laptop2-->USB-->Laptop1




--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-18-2012, 12:36 PM
William Scott Lockwood III
 
Default mount usb: same username different uid: problem

On Jun 18, 2012 7:30 AM, "Uwe Brauer" <oub@mat.ucm.es> wrote:

>

> >> On Mon, 18 Jun 2012 16:54:30 +1000, Basil Chupin <blchupin@iinet.net.au> wrote:

>

> * > On 18/06/12 16:35, Uwe Brauer wrote:

> * >>>> On Sat, 16 Jun 2012 19:19:42 +1000, Basil Chupin

> * >>

> * >> > sudo chmod -R u=rwx,g=rwm o= /dev/<USB-device> [ENTER]

> * >>

> * >> Right but I consider this solution as being cumbersome

> * >> especially if there are a lot of files.

>

> * > Right..."cumbersome"...

>

> * > You only ever need to do it ONCE.

>

> No. I need to do this every time I copy from

>

> Laptop1-->USB-->Latop2

>

> And then when I copy back

>

> Laptop2-->USB-->Laptop1


If you make sure your UID is the same on both machines, you shouldn't need to do that at all.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-18-2012, 02:16 PM
"Kevin O'Gorman"
 
Default mount usb: same username different uid: problem

On Mon, Jun 18, 2012 at 5:36 AM, William Scott Lockwood III
<vladinator@gmail.com> wrote:
> On Jun 18, 2012 7:30 AM, "Uwe Brauer" <oub@mat.ucm.es> wrote:
>>
>> >> On Mon, 18 Jun 2012 16:54:30 +1000, Basil Chupin
>> >> <blchupin@iinet.net.au> wrote:
>>
>> * > On 18/06/12 16:35, Uwe Brauer wrote:
>> * >>>> On Sat, 16 Jun 2012 19:19:42 +1000, Basil Chupin
>> * >>
>> * >> > sudo chmod -R u=rwx,g=rwm o= /dev/<USB-device> [ENTER]
>> * >>
>> * >> Right but I consider this solution as being cumbersome
>> * >> especially if there are a lot of files.
>>
>> * > Right..."cumbersome"...
>>
>> * > You only ever need to do it ONCE.
>>
>> No. I need to do this every time I copy from
>>
>> Laptop1-->USB-->Latop2
>>
>> And then when I copy back
>>
>> Laptop2-->USB-->Laptop1
>
> If you make sure your UID is the same on both machines, you shouldn't need
> to do that at all.


Actually, unless this memory stick has been reformatted with a *nix
filesystem, it should not have a UID or username on it at all. Such
things just don't exist in a fat filesystem, which is what's on all of
them I've ever seen in stores.

So unless it has been reformatted in say ext2, there's something more
you should be telling us.

--
Kevin O'Gorman, PhD

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-18-2012, 03:09 PM
Uwe Brauer
 
Default mount usb: same username different uid: problem

>> On Mon, 18 Jun 2012 07:16:02 -0700, "Kevin O'Gorman"
>> <kogorman@gmail.com> wrote:

>>
>> If you make sure your UID is the same on both
>> machines, you shouldn't need to do that at all.


> Actually, unless this memory stick has been reformatted with a *nix
> filesystem, it should not have a UID or username on it at all. Such
> things just don't exist in a fat filesystem, which is what's on all of
> them I've ever seen in stores.

Well of course, I said this is my first mail, the stick has
been reformatted with a jfs file system. I did that because
this way rsync is much more efficient!


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-18-2012, 05:56 PM
"Kevin O'Gorman"
 
Default mount usb: same username different uid: problem

On Mon, Jun 18, 2012 at 8:09 AM, Uwe Brauer <oub@mat.ucm.es> wrote:
>>> On Mon, 18 Jun 2012 07:16:02 -0700, "Kevin O'Gorman"
>>> <kogorman@gmail.com> wrote:
>
> * >>
> * >> If you make sure your UID is the same on both
> * >> machines, you shouldn't need to do that at all.
>
>
> * > Actually, unless this memory stick has been reformatted with a *nix
> * > filesystem, it should not have a UID or username on it at all. *Such
> * > things just don't exist in a fat filesystem, which is what's on all of
> * > them I've ever seen in stores.
>
> Well of course, I said this is my first mail, the stick has
> been reformatted with a jfs file system. I did that because
> this way rsync is much more efficient!

Then you really do have a problem. It has solutions, none of which is
perfect. For example
- change your UID to agree across all systems
- get familiar with udev rules and write your own
- try the 'user' flag in the /etc/fdisk entries
- change permissions on all files and directories on the stick, and
keep changing them as rsync changes things.

--
Kevin O'Gorman, PhD

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-18-2012, 06:23 PM
NoOp
 
Default mount usb: same username different uid: problem

On 06/17/2012 11:35 PM, Uwe Brauer wrote:
...
> Another solution would be to use
> sudo rsync
>
> If rsync had an option to specify uid and gid on the target
> system which I still don't know

grsync has the options:
o 'Preserve owner/Preserve group/...permissions/...time.
o 'Advanced Options|Don't map uid/gid values'.
o 'Extra options' allows you to execute a command before/after rsync &
'Run as superuser'.
You can save the session so that you simply call up the same one next
time, click & go.

$ sudo apt-get install grsync

https://help.ubuntu.com/community/rsync
[screenshot down below '5. Basic Options']
http://www.opbyte.it/grsync/

And of course, grysync is a gui frontend for rsync. So rsync will also
have those options:

http://manpages.ubuntu.com/manpages/precise/man1/rsync.1.html
--numeric-ids
With this option rsync will transfer numeric group and user IDs
rather than using user and group names and mapping them at both
ends.

By default rsync will use the username and groupname to
determine what ownership to give files. The special uid 0 and
the special group 0 are never mapped via user/group names even
if the --numeric-ids option is not specified.

If a user or group has no name on the source system or it has no
match on the destination system, then the numeric ID from the
source system is used instead. See also the comments on the
“use chroot” setting in the rsyncd.conf manpage for information
on how the chroot setting affects rsync’s ability to look up the
names of the users and groups and what you can do about it.

http://manpages.ubuntu.com/manpages/precise/man5/rsyncd.conf.5.html
[ uid, gid, numeric-ids, filter]

I use grysync - perhaps someone on the list that is well versed in rsync
cli can advise on the exact command(s) you need to use.



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-18-2012, 07:01 PM
Tom H
 
Default mount usb: same username different uid: problem

On Mon, Jun 18, 2012 at 2:23 PM, NoOp <glgxg@sbcglobal.net> wrote:
> On 06/17/2012 11:35 PM, Uwe Brauer wrote:

JFS has uid/gid mount options:

http://www.mjmwired.net/kernel/Documentation/filesystems/jfs.txt

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-18-2012, 09:35 PM
NoOp
 
Default mount usb: same username different uid: problem

On 06/18/2012 12:01 PM, Tom H wrote:
> On Mon, Jun 18, 2012 at 2:23 PM, NoOp <glgxg@sbcglobal.net> wrote:
>> On 06/17/2012 11:35 PM, Uwe Brauer wrote:
>
> JFS has uid/gid mount options:
>
> http://www.mjmwired.net/kernel/Documentation/filesystems/jfs.txt
>

Nice!
Any idea how that might be accomplished w/rsync via the cli?



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 12:12 PM.

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