[Live-demo] please avoid chown user:user

Hamish hamish_b at yahoo.com
Fri Sep 18 02:15:12 PDT 2009


Stefan wrote:
> I played in the last couple of days a bit with generating
> an ISO-image from the VM and ran into a few problems.
> 
> One of them is that some install-scripts change the owner of some files
> outside $HOME to "user". Unfortunately this doesn't go well when you
> boot from the LiveDVD. The original "user" is deleted, when the ISO is
> generated, and a new user is created during the boot process (apparently
> that is the way things have to be). Files that belonged to the old
> "user" belong on the LiveDVD to the uid=1000, but the new user has the
> uid=999. Therefore, the new user cannot write these files and some
> applications won't work (so far I had problems with Geoserver and
> Degree, but I haven't tested all applications). So Instead  of changing
> the owner of a file or directory, please keep root as owner and just
> change the access permissions. If you do so, please only change the
> write-permissions of a file only if you really, really have to. AFAIK
> everything writable is loaded into the memory, when you boot from the DVD.

are files stored in /home/user automatically chown'd to the new UID?
e.g. prepared .rc files setting up data paths. If not, how to ensure
that the user has access rights to Desktop/ .xfce/ etc.?
Would those need to go into /etc/skel/ instead of $USER_HOME?


and doing it be user groups should be ok, right? because the /etc/group
file works by name, not filesystem UID code, and the standard non-user
GIDs are distro-stable.   the method I was using was like:

# allow users to add new data to existing in /usr/local/share/gpsdrive
adduser $USER_NAME users
chown -R root.users /usr/local/share/gpsdrive/maps
chmod -R g+rwX /usr/local/share/gpsdrive/maps
ln -s /usr/local/share/gpsdrive/maps "$USER_HOME/.gpsdrive/maps"


how about `chown 999.999 *` in the install script instead of user.user?
can we consider uid=999 to be stable?


thanks,
Hamish



      



More information about the Osgeolive mailing list