Sign up ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I'm having a problem with file permissions... Iv'e got a python program to automatically take pictures using fswebcam (by running a bash script using subprocess.call). however when i try to delete these files from my mac (SSH) (or even from the pi command line rm -r without sudo) i dont have permission.

if i run the fswebcam command myself i can delete it.

when created with the script it is owned by root (in group pi) and owned by pi if i run it (and in group pi). Even when i chmod the file to 777 i cannot delete it.

Any solutions? Thanks

EDIT: The permissions for the containing folder is drwxr-sr-x. This folder is created using os.mkdir("folder_name"), how do i stop this from creating the folder as both setuid bit and execute bit?

share|improve this question
    
Check the ownership and permissions of the directory. Deleting a file requires permission to modify the directory. – Craig Feb 24 '14 at 19:07
    
The directories permissions are: drwxr-sr-x. I dont know what the 's' is :/ These created using os.mkdir("folder_name"). – Waddas Feb 24 '14 at 20:17
    
Do you have any dmask bits or umask bits set in your fstab file? How is your drive(s) mounted? – Alex Glover Feb 25 '14 at 0:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.