1

I am trying to create a setup.py that will build rpm/deb packages and I want it to create a blank directory with 777 permissions. I have it creating the directory via data_files

  data_files=[ 
                ( '/var/spool/my_dir', [] )
             }

But it creates the directory with 755 permissions. How do i get setup.py to create this directory with 777 permissions??

1

2 Answers 2

1

There is a way to do this. You will need to override the install method. See my answer here: set file permissions in setup.py file

Sign up to request clarification or add additional context in comments.

Comments

0

I don't think there's a way to specify file permissions in the call to setup.

You could always import os and do something like os.chmod('/var/spool/my_dir', 0777) after the setup call. To be honest though, I wonder if you really need those permissions.

1 Comment

thanks for the reply John. I don't think os.chmod works when building an rpm/deb package (i could be wrong). Thanks again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.