chown script
chown script
Im trying to make a chown script for sabnzbd i have a .sh file that has "chmod -R usernamehere $1 but it will not run.
Re: chown script
how does it need to chmod
There is no value set .. like 777 or 755 or whatever
There is no value set .. like 777 or 755 or whatever
Re: chown script
oops i ment chown
Re: chown script
normally chown command is done like this in linux :
chown usernamehere:usernamehere -R $1
chown usernamehere:usernamehere -R $1
Re: chown script
Changing file ownership is privileged, i.e. your script won't work unless sab runs as root. Probably better to just start the application as the user you want to own the downloaded files.
Re: chown script
its running as root, thats the problem. Im running sabnzbd on freenas and trying to get the permissions set for users. If I download something with sabnzbd its always locked to root.
-
- Newbie
- Posts: 1
- Joined: October 9th, 2010, 8:54 pm
Re: chown script
I had a similar issue, Sabnzbd is running on another device but ultimatly the files are trasnfered to my freenas box for storage. What you could do is create a scripts directory on your freenas box and have cron run it every 5 minutes.
The script then sets the owner of the download directory for you every 5 mintues.
Something like below
That makes anyone able to read the files from /mnt on. Change that to suit your needs.
I actually run this script every 5 seconds because I am impatient.
The script then sets the owner of the download directory for you every 5 mintues.
Something like below
Code: Select all
#!/bin/bash
chmod -R 777 /mnt/*
chown -R newuser:wheel /mnt/*
I actually run this script every 5 seconds because I am impatient.