I have a bash script where I use the quota command like quota -gl $USER
which works fine.
But if I start the script as a service with supervisord I get the error:
quota: username (gid 1170): Permission denied
in the supervisord log. Actually the supervisord is running with the rights of my user and it should have the same permissions, why not with this command?
I can break it down into a simple test supervisord config:
$ cat test.ini
[program:test]
command=/bin/bash -c "while true; do quota -gsl $USER; sleep 1; done"
returns:
2023-03-05 15:18:55,763 DEBG 'test' stderr output:
quota: testuser (gid 1170): Permission denied
but running it on the shell of course works:
$ /bin/bash -c "while true; do quota -gsl $USER; sleep 1; done"
Disk quotas for group testuser (gid 1170):
Filesystem space quota limit grace files quota limit grace
/dev/sda2 18948K 10240M 11264M