Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Can't Change ownership of symlink



Stephen J. Turnbull wrote:
> Dave Gutteridge writes:
> 
>  > Try becoming the user apache runs as, e.g. "www":
>  > 
>  > This can't be good:
>  > dave@example.com:~$ su - www
>  > Unknown id: www
> 
> Try wwwdata, which is used by Debian and I believe Ubuntu, for this
> purpose.
> 
> Sorry I can't be of help on the main question.
> 
> 

On my ISP's machine, the apache user looks like it's
probably apache.  I got this by cat'ing /etc/passwd.  On
your system, you may be able to look at the password file to
see who owns the http server.  I'd look for http, apache, or
www in the user name (first field on each line in the ':'
separated entries in the password file).  It may also not
work depending on how your system is configured.

As to symbolic links -- where they get interesting is that
you have two files: the link and the file it's pointed at.
Man on chown shows this among other things:
-h, --no-dereference
    affect each symbolic link instead of any referenced file

    (useful only on systems that can change the ownership of
    a symlink)
It's likely that instead your chown took effect on the file
that the link pointed at instead of the file.  You should be
able to create the link as root then chown -h to user:group.

Also, with the directory permission for '.' you sent
earlier, only root has read-write permission, so only root
can create files or links there.  When you're done, it would
be wise to make sure that the directory permission is as it
was before you started.

Good luck
Steve S.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links