s3cmd violates XDG basedir spec on linux
according to http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.
s3cmd is storing all config files in the home directory and violating the spec.
@mdomsch What do you think? should we change that to be the default?
I don't have a strong opinion. $HOME/.s3cfg (and that pattern) has been around far longer than the 2010 XDG spec, and it's voluntary. There isn't a huge reason we should have to follow that - think of it more like a recommendation. We also have people asking if we could get credentials out of ~/.aws/config.
If someone felt strongly about doing it, allowing use of ~/.s3cfg, or either of these other XDG recommendations, I'd be fine with that. If they wanted to remove ~/.s3cfg and force users to move their config files, I'd reject.
On Wed, Nov 18, 2015 at 4:25 PM, Florent Viard [email protected] wrote:
@mdomsch https://github.com/mdomsch What do you think? should we change that to be the default?
— Reply to this email directly or view it on GitHub https://github.com/s3tools/s3cmd/issues/658#issuecomment-157907975.
I believe the ideal behavior would be:
- If no s3cfg file exists (neither in
$XDG_CONFIG_HOME, or as$HOME/.s3cfg), create it in$XDG_CONFIG_HOME. - if the
$XDG_CONFIG_HOME/s3cmd/configfile exists, use it. - if the
$HOME/.s3cfgfile exists, use it.
@fviard, @mdomsch, what do you guys think? I would be willing to work on that next month if you agree.
This is issue is quite old, but I'd be willing to work on it if the maintainers still have this position.
It's not uncommon to have a read-only home directory, with XDG environments variables pointing to actually RW paths.