Score:0

cannot execute quota command on centos7 with supervisord service

vn flag

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
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.