I've programmed a script using python which logs in as root on the host machine and executes some commands. Therefore it uses ssh. I want to setup acl. If I do following commands in the command line, everything works well.

s.execute("setfacl -m user:www-data:r-x,mask:r-x /srv/gitosis/.ssh")
s.execute("setfacl -m user:www-data:r--,mask:r-- /srv/gitosis/.ssh/id_dsa")

This is the python call and I always get:

setfacl: /srv/gitosis/.ssh: Operation not supported
setfacl: /srv/gitosis/.ssh/id_dsa: Operation not supported

What is the problem here? Doing that via ssh directly works well.

closed as too localized by Michael Mrozek Mar 6 '12 at 14:52

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What is s? What OS are you using? Is ACL enabled on the filesystem? – Karlson Feb 8 '12 at 20:58
  • I'm using Debian 6.0.4. Yes acl is enabled. If I call the command directly via bash it works. s is my ssh handle inside python. On this handle I can write via execute on the command line. – Razer Feb 8 '12 at 21:02
  • When you say when I do the following from the command line are you logged onto the target machine? – Karlson Feb 8 '12 at 21:22
  • yes - but also via ssh (from the same machine where I execute the python script). – Razer Feb 8 '12 at 21:32
  • Can you post how s is defined/opened? – Karlson Feb 8 '12 at 21:35

Browse other questions tagged or ask your own question.