Update write permission

Linux related discussion about netjukebox
Locked
aerotech
User
Posts: 2
Joined: Wed Feb 17, 2010 12:06 pm

Update write permission

Post by aerotech »

Hello,

my netjukebox server is running now but when i click "update" to update my media it says:

Can't write file:
/media/disk3/movies - serie/Dexter/Seizoen 3/d2pipwuisu.id

* Check file/directory permission

I've checked on google en this forum but couldn't find anything, can anybody help me with this?
pygmypenguin
User
Posts: 3
Joined: Wed Feb 17, 2010 2:04 am

Re: Update write permission

Post by pygmypenguin »

you need to grant permissions to netjukebox. if you're running on a unix machine, try this:

cd /top/of/media/path
find . -type d -exec chmod o+w {} \;

what this will do is look at each of the files in the tree specified by /top/of/media/path (in your case it looks like /media/disk3, but really it's whatever you put in $cfg['media'dir]), and determines whether whatever it sees is a file or folder. if it's a folder, it'll grant write permissions to 'other'. if it's a file, it won't do anything, so you don't need to worry about someone coming in and overwriting all your media.

unfortunately if you're running on windows i can't help you...
aerotech
User
Posts: 2
Joined: Wed Feb 17, 2010 12:06 pm

Re: Update write permission

Post by aerotech »

Thnx for your reply.

I solved it by deleting line 1052, 1053 in update.php

if (file_put_contents($dir . $album_id . '.id', '') === false)
message(__FILE__, __LINE__, 'error', 'Can\'t write file:[br]' . $dir . $album_id . '.id
  • Check file/directory permission
');
User avatar
wbartels
netjukebox developer
Posts: 872
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: Update write permission

Post by wbartels »

aerotech wrote:Thnx for your reply.

I solved it by deleting line 1052, 1053 in update.php

if (file_put_contents($dir . $album_id . '.id', '') === false)
message(__FILE__, __LINE__, 'error', 'Can\'t write file:[br]' . $dir . $album_id . '.id
  • Check file/directory permission
');
This is not a good idea; see: viewtopic.php?f=5&t=507
Locked