Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jan 2013 16:10:09 -0600
From:      Joshua Isom <jrisom@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Fwd: Re: Sharing a mail folder between Linux and FreeBSD
Message-ID:  <5101B141.2090909@gmail.com>
In-Reply-To: <op.wreshnxpqhadp0@freebsd>
References:  <1358988080.4855.5.camel@precise> <op.wreshnxpqhadp0@freebsd>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1/24/2013 3:26 AM, Ralf Mardorf wrote:
> I was surpriesed, when Evolution from Linux had no permissions anymore
> to access the mail folder, after
> drwxrwx--- rocketmouse  wheel was stable for FreeBSD
>
> I wasn't aware, that even between Linux only, the folders for mount
> points share the same permissions, once the partition is mounted, since
> my Linux users usually share the same uid. I tested it some minutes ago.
>
> However, I add a group freebsd (1001) to a Linux and chown/chmod most of
> the pass without -R option and for the mail directory I used the -R
> option, now everything _should_ work ...
>
> $ ls -hAl /mnt
> drwxrwx---  21 1000  rocketmouse   4.0k Oct 28 19:11 archlinux
>
> but at the end of the pass I noticed this:
>
> $ ls -hAl /mnt/archlinux/home/spinymouse/.local/share/evolution/mail
> total 28
> drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:37
> 1323712251.1853.2@archlinux
> drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:13 1353406324.3645.4@q
> drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:13 1353606434.360.4@q
> drwx------   2 1000  1000          4.0k Jan 24 02:37
> 1358783158.2173.1@precise
> drwxrwx---  17 1000  rocketmouse   4.0k Jan 24 02:37 local
> drwxrwx---   4 1000  rocketmouse   4.0k Jan 24 02:10 trash
> drwxrwx---   2 1000  rocketmouse   4.0k Jan 24 02:37 vfolder
>
> I suspect I write-accessed /1358783158.2173.1@precise with a Linux that
> has no group 1001?
>
> I'll add a group or user 1001 to all Linux and I'll add a user or group
> 1000 to FreeBSD.
>
> If I've done that, could I expect still any issues?
>
> Regards
> Ralf
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe@freebsd.org"

If you're primarily using Linux and toying with FreeBSD, I'd just change 
your uid and gid to match what you use on linux.  If your Linux uid is 
1000 and your FreeBSD uid is 1001 you'll always have a problem.

Your best bet it to open up and edit /etc/passwd, /etc/master.passwd, 
and /etc/group and change all the 1001's to 1000.  You should be safe 
since the uid is so high.  Some programs expect certain things to be a 
certain uid, but you should be safe with 1000.  You'll have to remember 
to chown all the files.  Files are stored by the number, the name's for 
human.  I assume running these two commands should do it.

find / -uid 1001 -exec chown 1000 '{}' \;
find / -gid 1001 -exec chown :1000 '{}' \;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5101B141.2090909>