Upstart overrides the user's umask
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart |
Fix Released
|
Undecided
|
James Hunt | ||
upstart (Ubuntu) |
Fix Released
|
High
|
James Hunt | ||
Precise |
Won't Fix
|
High
|
Unassigned | ||
Saucy |
Won't Fix
|
High
|
Unassigned |
Bug Description
I set the umask in my ~/.profile. In previous releases of Ubuntu this worked nicely. Now, I find it has been reset from 0027 to 0022. On investigation, this appears to be upstart's fault. Setting
umask 027
in an upstart override file for my desktop session (gnome-session) restores the desired functionality, but obviously this is not ideal, as it's a duplicated setting (I still need the setting in ~/.profile, e.g. for terminal and ssh logins).
This sort of problem has been common in other parts of the stack in the past (e.g. gdm/gnome-session used to stomp on the user's umask too), so it's understandable that it comes up in upstart, but equally it would be nice to fix it!
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: upstart 1.10-0ubuntu7
ProcVersionSign
Uname: Linux 3.11.0-12-generic x86_64
.home.rrt.
# Duplicate this here as upstart overrides the user's umask
umask 027
ApportVersion: 2.12.5-0ubuntu2
Architecture: amd64
Date: Wed Oct 16 21:10:47 2013
InstallationDate: Installed on 2011-05-24 (876 days ago)
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
MarkForUpload: True
SourcePackage: upstart
UpgradeStatus: Upgraded to saucy on 2013-10-10 (5 days ago)
UpstartBugCategory: Session
UpstartRunningS
UpstartRunningS
UpstartRunningS
upstart.
upstart.
Job got added /com/ubuntu/
Job got added /com/ubuntu/
Job got added /com/ubuntu/
Related branches
- Dimitri John Ledkov: Approve
-
Diff: 528 lines (+170/-40)8 files modifiedChangeLog (+21/-1)
init/job_class.c (+8/-1)
init/job_process.c (+2/-2)
init/main.c (+8/-3)
init/tests/test_main.c (+8/-8)
test/test_util_common.c (+9/-5)
test/test_util_common.h (+4/-3)
util/tests/test_initctl.c (+110/-17)
Changed in upstart: | |
status: | In Progress → Fix Committed |
Changed in upstart: | |
status: | Fix Committed → Fix Released |
Hi Reuben - thank you for reporting this bug and making Ubuntu better!
You are right: Upstart does reset the umask to 022 in a jobs environment unless the umask stanza has been specified in a job. This is correct behaviour for Upstart running as PID 1 but when running as a Session Init it really should inherit the current umask and use that for all jobs by default.
For consistency and backwards compatibility, we should also add a '--no-inherit- umask' option.