[BUG] rgw/sfs: process aborts when writing data if running as unprivileged user #194
Labels
area/rgw-sfs
RGW & SFS related
kind/bug
Something isn't working
triage/next-candidate
This could be moved to the next milestone
Describe the bug
The radosgw binary can be run with --setuser and --setgroup parameters, to make it drop root privileges after the process is initialized. Unfortunately, the SFS data store is created before privileges are dropped, which means the data directory and sqlite database are owned by root. Note the log on startup, which shows this ordering:
When run as an unprivileged user like this, the process starts just fine, but then if you try to write anything (create a bucket, put an object), the process will abort.
To Reproduce
groupadd -r s3gw ; useradd -r -g s3gw -s /sbin/nologin -d /var/lib/empty s3gw
)radosgw -d --no-mon-config --id s3gw --rgw-data /data --run-dir /run --rgw-sfs-data-path /data --rgw-backend-store sfs --debug-rgw 1 --setuser s3gw --setgroup s3gw
/data/s3gw.db
is created world readable, but only writable by rootExpected behavior
The data directory and s3gw.db are owned by the user and group s3gw is running as, rather than being owned by root.
The text was updated successfully, but these errors were encountered: