Page 1 of 1

Update write permission

Posted: Wed Feb 17, 2010 12:09 pm
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?

Re: Update write permission

Posted: Wed Feb 17, 2010 1:45 pm
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...

Re: Update write permission

Posted: Thu Feb 18, 2010 11:48 am
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
');

Re: Update write permission

Posted: Thu Feb 18, 2010 10:03 pm
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