Jump to content

File ownership with 5beta


Recommended Posts

OK since upgrading to 5beta and running the permissions script all my files are owned by nobody/users.

 

However my apps like Sickbeard, SABnzbd etc run as root, and downloads moved to my user shares have ownership root/root, making them inaccessible over AFP on my mac mini.

 

Do I have to keep running the permissions script regularly, or have people found other ways to set the ownership correctly after copying?

 

Obviously I'd like it to be automatic.

 

Thanks!

Link to comment

thats one of the reasons, why i'm running these apps as nobody.

i guess, you could add a chown command to the sabnzbd post precessing scripts...

 

Please could you share the commands you use to run them as nobody?  

 

Despite numerous attempts, I've not been able to do it from advice I've read in previous posts.  

 

Thank you!

Link to comment

here are the lines from my go script:

 

cd /mnt/usenet/.apps
usermod -s /bin/bash nobody  
su nobody -c "umask 0002"

#Start SABNZBD
su nobody -c "python /mnt/usenet/.apps/sabnzbd/SABnzbd.py -d -s 0.0.0.0:8080"

#Start CouchPotato
su nobody -c "python /mnt/usenet/.apps/couchpotato/CouchPotato.py -d"

#Start SickBeard
su nobody -c "python /mnt/usenet/.apps/sickbeard/SickBeard.py -d"

Link to comment

hmm had some errors about permissions on python, so added +x to /usr/bin/python. Then permission errors on sabnzbd.py, so chowned all the SAB files to nobody:users

 

now getting

 

root@Tower:/mnt/wd1/root/SABnzbd# su nobody -c "python /mnt/wd1/root/SABnzbd/SABnzbd.py -d -s 192.168.0.2:8080"

'import site' failed; use -v for traceback

Traceback (most recent call last):

  File "/mnt/wd1/root/SABnzbd/SABnzbd.py", line 24, in <module>

    import logging.handlers

ImportError: No module named handlers

 

So I guess I don't have permissions to access certain python libraries or something?

Link to comment

how are you installing python?

i'm using SABnzbdDependencies-2.2-i486-unRAID.tgz with this command in my go file: installpkg /boot/packages/SABnzbdDependencies-2.2-i486-unRAID.tgz

 

my sab files are all owned by nobody:users

 

edit:

how to get SABnzbdDependencies-2.2-i486-unRAID.tgz:

 

get the SABnzbdDependencies-2.1 (http://www.bibliognome.com/unraid/SABnzbdDependencies-2.1-i486-unRAID.tgz) and run following commands

mkdir /tmp/depend
cp /boot/packages/SABnzbdDependencies-2.1-i486-unRAID.tgz /tmp/depend
cd /tmp/depend
tar -zxvf SABnzbdDependencies-2.1-i486-unRAID.tgz
chown -R nobody install
chown -R nobody usr
tar -zcvf /boot/packages/SABnzbdDependencies-2.2-i486-unRAID.tgz usr install
cp SABnzbdDependencies-2.2-i486-unRAID.tgz /boot/packages/

 

then the python files, which are installed by this package, are owned by "nobody"

Link to comment

I've just been doing this in the past:

 

# Install SAB dependencies

echo "Install SAB dependencies..."

installpkg /mnt/wd1/root/packages/SABnzbdDependencies-2.1-i486-unRAID.tgz

 

echo "Starting SABnzbd..."

python /mnt/wd1/root/SABnzbd/SABnzbd.py -d -s 192.168.0.2:8080

 

Can I follow your instructions without rebooting?

Link to comment

you can at least create the 2.2 package without rebooting.

i believe, if you install the 2.2 package, the old python files will all be overwritten by the new ones.

try it, you can't really break it. if it doesn't work, just reboot after you changed your go script to install the new package.

Link to comment

I have created a unMenu packages to do the same thing.  If running under 5.0b the apps are started and run as nobody, if on 4.7 they are run as root.

 

That would be very helpful - how might I go about getting these unMenu packages?

 

Find them in the User Customization forum.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...