Re: Changing permission in user's home directory

2014-12-20 Thread Peter Gerber
On our server we create an user for every of our customer and we run an 
instance of home-made java application (as the customers respective user). The 
issue is just who ever set up those servers created a home directory per user 
and set up everything in that directory. Including static files needed by ngnix 
for which I need to do something like $chgrp www-data  after an update.

I'm aware there is no technical reasons for having such a weird directory 
constellation. The issue is just reorganizing file hierarchies on docents of 
productive installations is not that easy, so I hoped for an easy work-around 
for the old installations. At least until the long overdue revision of the 
update and installation procedure has been done.

On Sunday 21 December 2014 02.21:39 David Christensen wrote:
> On 12/20/2014 04:11 PM, Peter Gerber wrote:
> > I want to change permission of a directory, recursively. The directory is
> > a subdirectory of a user's home directory.
> 
> Why?  To what?  E.g. what is the technical requirement(s) that forces
> you to change permission of a directory and/or it's contents, and what
> must those permissions be?
> 
> 
> David


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/201412210315.22386.pe...@arbitrary.ch



Changing permission in user's home directory

2014-12-20 Thread Peter Gerber
I want to change permission of a directory, recursively. The directory is a 
subdirectory of a user's home directory.

Is there a way to do this in a secure and easy way with the user having full 
write access to the home directory?

Let's assume I would change the permissions as follows
$ chgrp -R www-data ~user/subdir
$ chmod -R g+rwX ~user/subdir

The issue is that the user could do something like this beforehand:
$ mv ~user/subdir ~user/subdir2
$ ln -s / ~user/subdir

Not a very nice thing to do, is it?

Well, I could just change the user's permission for the home directory as 
follows:
$ chown root:users-group ~user
$ chmod g+rwx,+t

But this seems rather error-prone. Especially because I would have to adjust 
the permission of quite a lot of directories, some of which are not even in 
the top level of the users' home directories. Frankly, me forgetting to adjust 
the permissions of a few directories is just to great.

What I now would like to know is, is there an easier way to solve the issue. 
Like teaching chmod not to follow links. Unfortunately, I haven't found a --
make-sure-as-hell-not-to-follow-links-in-any-way parameter or anything the 
like.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/201412210111.32524.pe...@arbitrary.ch