Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 536314 - /var/log/gkeys/ owned by root
Summary: /var/log/gkeys/ owned by root
Status: CONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: gentoo-keys (show other bugs)
Hardware: All Linux
: Normal normal
Deadline: 2020-05-19
Assignee: Gentoo-keys project
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2015-01-11 14:57 UTC by Johann Schmitz (ercpe) (RETIRED)
Modified: 2020-04-19 12:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johann Schmitz (ercpe) (RETIRED) gentoo-dev 2015-01-11 14:57:50 UTC
After emerging app-crypt/gkeys-gen-0.1-r1, /var/log/gkeys/ is owned by root.
Running gkeys-gen as a normal user raises an exception because the application cannot write the logfile.

Reproducible: Always
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2015-01-11 16:55:00 UTC
Please post the ls -l listing for /var/log/gkeys

The ebuild already does : 

	keepdir /var/log/gkeys
	fperms g+w /var/log/gkeys
Comment 2 Johann Schmitz (ercpe) (RETIRED) gentoo-dev 2015-01-11 17:02:49 UTC
ll /var/log/gkeys/
total 16K
drwxrwxr-x 2 root users 4.0K Jan 11 17:58 .
drwxr-xr-x 7 root root  4.0K Jan 11 17:58 ..
-rw-r--r-- 1 root root  4.4K Jan 11 17:58 gkeys-20150111-17:58.log
-rw-r--r-- 1 root root     0 Jan 11 17:58 .keep_app-crypt_gkeys-0



Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/gkeys-gen", line 50, in <module>
    success = main()
  File "/usr/lib64/python2.7/site-packages/gkeygen/cli.py", line 56, in __call__
    ok = self.setup(args, configs)
  File "/usr/lib64/python2.7/site-packages/gkeys/base.py", line 273, in setup
    filemask=int(self.config.get_key('permissions', 'files'),0))
  File "/usr/lib64/python2.7/site-packages/gkeys/log.py", line 54, in set_logger
    file_handler = logging.FileHandler(logname)
  File "/usr/lib64/python2.7/logging/__init__.py", line 911, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib64/python2.7/logging/__init__.py", line 936, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/var/log/gkeys/gkeys-gen-20150111-17:59.log'


I'm not member of the users group and i believe users aren't added to users per default.
Comment 3 Richard Freeman gentoo-dev 2015-01-12 16:21:21 UTC
(In reply to Johann Schmitz (ercpe) from comment #2)
> I'm not member of the users group and i believe users aren't added to users
> per default.

That is likely the issue - I do have 775 group users permissions on the log dir, but a newly-created user (useradd -m) is not able to write to the directory.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-04-19 12:12:26 UTC
app-crypt/gkeys is last rited now.