[Voyage-linux] V0.6 bug?
Punky Tse
(spam-protected)
Mon Nov 24 17:36:43 HKT 2008
Hi Fabian,
Thanks. Got it.
Regards,
Punky
Fabian Ruff wrote:
> Hi,
>
> Punky Tse wrote:
>
>> Thank you for point this out. I am going to /tmp to be tmpfs mounted,
>> instead of using aufs. I have seen another thread using aufs will
>> override the base directory settings.
>>
>
> I've also noticed this bug and tried to give some feedback but my
> response didn't go to the list. Here is my previous post which went
> directly to punkytse at punknix.com:
>
> Fabian wrote:
>
>> I noticed one issue with /tmp which is also an aufs mount point.
>> When mounted from /etc/init.d/voyage-sync with
>> mount -t aufs -o dirs=/lib/init/rw/tmp:/tmp=ro none /tmp
>> /tmp changes its permissions:
>>
>>
>>> voyage:/# ls -l |grep tmp
>>> drwxrwxrwt 2 root root 1024 Oct 26 02:45 tmp
>>> voyage:/# mount -t aufs -o dirs=/lib/init/rw/tmp:/tmp=ro none /tmp
>>> voyage:/# ls -l |grep tmp
>>> drwxr-xr-x 3 root root 80 Oct 28 10:09 tmp
>>>
>> It seems that aufs merges the permissions from the two underlaying
>> directories with an bitwise AND operation. With the resulting
>> permissions no non-root owned process can write to /tmp which isn't to
>> good. ;)
>>
>> doing
>>
>>> voyage:/# chmod 777 /lib/init/rw/tmp
>>> voyage:/# chmod o+t /lib/init/rw/tmp
>>>
>> before the mount command fixes the problem.
>>
>> Maybe the voyage-sync script should adopt the permissons from the
>> SYNC_DIRS when creating there counterparts in /lib/init/rw ?
>>
>
> I did change the voyage-sync script to something like:
>
>> for SYNC_DIR in $SYNC_DIRS; do
>> [ ! -d $TMPFS_ROOT/$SYNC_DIR ] && mkdir -p $TMPFS_ROOT/$SYNC_DIR
>> + chmod --reference=/$SYNC_DIR $TMPFS_ROOT/$SYNC_DIR
>> + chown --reference=/$SYNC_DIR $TMPFS_ROOT/$SYNC_DIR
>> mount -t aufs -o dirs=$TMPFS_ROOT/$SYNC_DIR:$SYNC_DIR=ro none /$SYNC_DIR> /dev/null 2>&1
>> done
>>
>
> Greetings,
> Fabian
>
> _______________________________________________
> Voyage-linux mailing list
> Voyage-linux at list.voyage.hk
> http://list.voyage.hk/mailman/listinfo/voyage-linux
>
More information about the Voyage-linux
mailing list