#1
|
|||
|
|||
JD on QNAP - Downloaded and excrated fiels are readonly for normal user
Hello,
since i have installed jd2 on my qnap, i habe this issue. downloaded and extracted files are Read only for my daily use user. this are the permissions for JD2 created files: Code:
[/share/CE_CACHEDEV1_DATA/media/Downloads/jd2/download/cpu-z 1 83-en] # ls -l -rw-r--r-- 1 admin administ 594 Jan 25 21:08 cpuz.ini -rw-r--r-- 1 admin administ 26513 Jan 25 21:15 cpuz_readme.txt -rw-r--r-- 1 admin administ 3015424 Jan 25 21:08 cpuz_x32.exe -rw-r--r-- 1 admin administ 3520760 Jan 25 21:08 cpuz_x64.exe Code:
[/share/CE_CACHEDEV1_DATA/media/Downloads/jd2/download/cpu-z_1.83-en] # ls -l -rw-rw-rw- 1 niklas everyone 594 Jan 25 21:08 cpuz.ini -rw-rw-rw- 1 niklas everyone 26513 Jan 25 21:15 cpuz_readme.txt -rw-rw-rw- 1 niklas everyone 3015424 Jan 25 21:08 cpuz_x32.exe -rw-rw-rw- 1 niklas everyone 3520760 Jan 25 21:08 cpuz_x64.exe for propper use i want zu fix the issue instead of changing the file permissions evry time i whant zu access those. Any idea what has gone wrong? |
#2
|
||||
|
||||
You've got to either modify the script that starts JDownloader and add proper umask to it
or grant yourself read/write access to those files in Synology permission center. In case you've installed JD manually just modify your script and append umask 000 before the start of JDownloader. For example [CODE] #!/bin/bash umask 000 /path/...java -jar /path...JDownloader.jar >/dev/null 2>/dev/null & [CODE] or modify to run as your local user [CODE] #!/bin/bash su -c "/path/...java -jar /path...JDownloader.jar >/dev/null 2>/dev/null &" username [CODE]
__________________
JD-Dev & Server-Admin |
#3
|
|||
|
|||
Simple as that...
Dint know umask before. to fix the rights i have used chmod -R 777 * and in an quick test with an new created folder, from jd, it worked fine. i dont know the diffrences, but im using a qnap and "#!/bin/bash" causes this error "-sh: ./jd2.sh: /bin/bash^M: bad interpreter: No such file or directory" atm i start JD manually |
#4
|
||||
|
||||
instead of bash you can also try /bin/sh
the problem with chmod -R 777 is that it will only change all existing files but not new created ones, that's what umask is for.
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|