pam_mount.so chown to user when creating directory fails

Bug #557025 reported by Justin Jereza
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libpam-mount (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Binary package hint: libpam-mount

Removal of mount point tree on logout also fails.

I have <mkmountpoint enable="1" remove="true" /> in pam_mount.conf.xml.

Authentication log attached.

Line #8 mentions that the mount point cannot be chowned to the user. The owner of that directory from what i can see is 'user:root', not 'user:domain users' (The user is authed through winbind) which I suppose should be the correct result. In addition, The permissions for the directory that I see is 0711 which is weird for a directory. I'd expect either 0755 or 0700 or maybe a configuration setting in pam_mount.conf.xml.

On logout, ~/Shares/Development was removed but ~/Shares was not.

Revision history for this message
Justin Jereza (justinjereza) wrote :
Revision history for this message
Montana Arble (montana-arble) wrote :

Could you post your pam_mount.conf.xml file?

Revision history for this message
Ryan Tandy (rtandy) wrote :

I found that this happened when the mount point was somewhere that the user had permissions to create the directory: in my case it was under /tmp, but somewhere under $HOME would have the same behaviour. The problem is that chown isn't allowed, since you aren't root; then the code tries to make the directory again (this time as root), but fails because it already exists.

A workaround is to mount the directory somewhere where only root has permissions to create directories. For myself I chose to place it under /var/run. When I have a moment I will whip up a patch that makes it remove the directory when the chown fails, and post that here for possible SRUing.

Changed in libpam-mount (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.