Bug 308415

Summary: yast users: can't create user with existing homedir *without* chown'ing the homedir
Product: [openSUSE] openSUSE 11.0 Reporter: Christian Boltz <suse-beta>
Component: YaST2Assignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Enhancement    
Priority: P5 - None    
Version: Alpha 2   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Christian Boltz 2007-09-06 21:23:35 UTC
It's impossible to create an user with existing homedir *without* chown'ing the homedir to the newly created user.

How to reproduce:
- start  yast users
- add an user, go to details tab
- enter an existing directory in the "Home Directory" field

The result is the following message:

    The home directory selected already exists.
    Use it and change its owner?
           [Yes]  [No] 

Yes chown's the directory to the new user
No just goes back to the details dialog

-> it's impossible to use an existing home directory *without* chown'ing it to the new user (and: yes, this is really needed sometimes - at least a customer has such interesting wishes.)

Please add another option that allows to create the user, but without chown'ing the home directory.
Comment 2 Stanislav Visnovsky 2007-09-10 14:51:34 UTC
Christian, what is the setup where you need this functionality?
Comment 3 Christian Boltz 2007-09-10 16:35:45 UTC
I run a webserver, and now a customer needs an additional FTP user for an exsiting directory - which already contains a PHP content management system (read: some subdirectories *must* be writeable by wwwrun)

In practise, it looks like this (with the additional user already created):

directory                     owner
-----------------------------------------
/home/www/customer.de         customer
   /httpdocs                  webmaster
      /fileadmin              wwwrun
      /user_upload            wwwrun
      /typo3                  webmaster
   /private                   customer
   /conf                      root
   /statistics                root

~customer  is /home/www/customer.de
~webmaster is /home/www/customer.de/httpdocs

Before creation of "webmaster", httpdocs and httpdocs/typo3 were owned by "customer".

BTW: I of course don't expect that YaST does chown httpdocs and httpdocs/typo3 without touching the other content (owned by wwwrun) - that would be overmuch ;-) 

However, a possibility not to touch the permissions at all would be really helpful because the current way to do it is
a) call useradd manually (bad)   or
b) do it with YaST and fix the permissions afterwards (even worse)
Comment 4 Jiří Suchomel 2007-09-10 18:55:04 UTC
I wouldn\t like to add new questions ("Use directory?" "Chown?") as it would be superfluous dor most users. There could be a popup with three buttons (Yes/No/Use but do not chown) but I'm not sure if that additional button would not be too confusing for most users...
Comment 5 Stanislav Visnovsky 2007-09-11 07:35:45 UTC
3 buttons or a checkbox?
Comment 6 Stanislav Visnovsky 2007-09-12 09:16:13 UTC
Information provided.
Comment 7 Jiří Suchomel 2007-09-12 17:29:40 UTC
Well, you've didn't answer my consern about the confusion... 
Anyway, I'll do something for after 10.3
Comment 8 Christian Boltz 2007-11-29 21:41:58 UTC
"after 10.3" sounds like "now" ;-)

My proposal would be a checkbox and a slightly modified text.

Current dialog:

    The home directory selected already exists.
    Use it and change its owner?
           [Yes]  [No] 

My proposal:

    The home directory selected already exists.
    Use it anyhow?

    [x] change owner

           [Yes]  [No] 

"change owner" should be checked by default.
Comment 9 Christian Boltz 2007-12-01 00:23:43 UTC
Minor additional text change:
"home directory selected" -> "selected home directory"
Comment 10 Jiří Suchomel 2008-04-16 13:00:04 UTC
Done in yast2-users-2.16.26 (see in beta2)