publicarray / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com/
Other
66 stars 14 forks source link

Permission denied when saving config via SRM UI #3

Closed tzhao11 closed 5 years ago

tzhao11 commented 5 years ago

The package installs and works fine on a RT1900ac running SRM 1.2-7742 Update 2, but I get open /var/packages/dnscrypt-proxy/target/var/dnscrypt-proxy.toml.tmp: permission denied when trying to save the config file via SRM Web UI. It looks like editing config files requires root privilege.

SynologyRouter> pwd
/var/packages/dnscrypt-proxy/target/var
SynologyRouter> ll
drwxr-xr-x    2 svc-dnsc root          4096 Oct 31 12:03 .
drwxr-xr-x    6 svc-dnsc root          4096 Oct 27 12:02 ..
-rw-r--r--    1 svc-dnsc root           841 Oct 27 12:02 blacklist.txt
-rw-r--r--    1 svc-dnsc root           764 Oct 30 15:35 cloaking-rules.txt
-rw-r--r--    1 svc-dnsc root          2570 Nov  1 07:38 dnscrypt-proxy.log
-rw-r--r--    1 svc-dnsc users            5 Oct 30 15:37 dnscrypt-proxy.pid
-rw-r--r--    1 svc-dnsc root         14386 Oct 30 15:36 dnscrypt-proxy.toml
-rw-r--r--    1 svc-dnsc root         13861 Oct 27 12:02 dnscrypt-proxy_install.log
-rw-r--r--    1 root     system        2637 Nov  1 09:26 dnscrypt-proxy_temp.log
-rw-r--r--    1 svc-dnsc root             0 Oct 27 12:02 domains-blacklist-local-additions.txt
-rw-r--r--    1 svc-dnsc root          5139 Oct 27 12:02 domains-blacklist.conf
-rw-r--r--    1 svc-dnsc root             0 Oct 27 12:02 domains-time-restricted.txt
-rw-r--r--    1 svc-dnsc root             0 Oct 27 12:02 domains-whitelist.txt
-rw-r--r--    1 svc-dnsc root           600 Oct 27 12:02 forwarding-rules.txt
-rw-r--r--    1 svc-dnsc root          5808 Oct 27 12:02 generate-domains-blacklist.py
-rw-r--r--    1 svc-dnsc root             0 Oct 27 12:02 ip-blacklist.txt
-rw-r--r--    1 svc-dnsc users        28554 Oct 31 12:03 public-resolvers.md
-rw-r--r--    1 svc-dnsc users          307 Oct 31 12:03 public-resolvers.md.minisig
-rw-r--r--    1 svc-dnsc root           723 Oct 27 12:02 whitelist.txt
publicarray commented 5 years ago

Thanks for reporting.

I have to do more testing on my end. The GUI program behaves differently in the SRM to the DSM on the DSM it is executed with root permissions on the RSM the program inherits the permissions from the web server... I thought that it was enough as I did not have any issues on my RT2600ac. I can reproduce on my router. I'll get back to you hopefully by the end of today.

publicarray commented 5 years ago

Since you are able to login via ssh you can work around this problem with chmod 777 /var/packages/dnscrypt-proxy/target/var

publicarray commented 5 years ago

fixed in b71a4e1401e162752a4bbfbb185e04574209927d and I made a new release.