8

I am trying to install transmission on my Ubuntu 14.04 server and I am unsure whether to skip this part or not. I am trying to give permissions to a folder with

sudo chmod -R 770 /etc/transmission-daemon/settings.json

but the output is

chmod: cannot operate on dangling symlink '/etc/transmission-daemon/settings.json

Am I doing something wrong or should I just skip this part or what?

I am following instructions from here: Install Transmission with web interface on Ubuntu, and I am at the end of step 5.

Update: Output of ls -l /etc/transmission-daemon/settings.json:

lrwxrwxrwx 1 root debian-transmission 51 Oct 6 18:12 /etc/transmission-daemon/settings.json -> /home/cam/.config/transmission-daemon/settings.json

I guess the file doesn't exist because when I run cd /home/cam/.config/transmission-daemon, then run dir, nothing shows up.

5
  • 1
    Having a symlink from a system directory to your home directory is... not very clean. In any case, does the file /home/cam/.config/transmission-daemon/settings.json exist?
    – fkraiem
    Oct 6, 2014 at 23:04
  • @fkraiem, I guess the file doesn't exist because when I perform the command cd /home/cam/.config/transmission-daemon and the do dir nothing shows up. I would imagine the config file is a template so I don't want to just make my own. How could I transfer the config file there? Although I would have thought the instructions I'm following would have taken that into account.
    – Cam Jones
    Oct 6, 2014 at 23:14
  • Normally you should have copied it there using the command sudo cp -a /etc/transmission-daemon/settings.json transmission-daemon/ from the guide. Maybe you were in the wrong directory when you ran it (this guide is really not very good), try cp /etc/transmission-daemon/settings.json /home/user/.config/transmission-daemon.
    – fkraiem
    Oct 6, 2014 at 23:17
  • @fkraiem, I already did that, mkdir /home/user/.config/transmission-daemon, sudo cp -a /etc/transmission-daemon/settings.json transmission-daemon/, sudo chgrp -R debian-transmission /home/user/.config/transmission-daemon, sudo chmod -R 770 /home/user/.config/transmission-daemon thats from the instructions
    – Cam Jones
    Oct 6, 2014 at 23:23
  • Yes, but because the command in the guide uses a relative path for the cp command, it will only work if you are in the directory ~/.config/transmission-daemon when you run it. Since apparently the file has not been copied correctly, you probably were in another directory, so you need to run the command again to copy the file in the correct directory.
    – fkraiem
    Oct 6, 2014 at 23:27

4 Answers 4

7

I fixed my dangling symlink error by using the full path, as this site suggests: https://www.howtofixthis.com/categories/linux/chmod-cannot-operate-on-dangling-symlink

So I did:

ln -s `pwd`/[executable] executable.bin

where the backticks (`) indicate command substitution

1

I had the same error but I created the symlink with the root user and tried to chmod with another user. Make sure you use the same user for both actions...

0

I believe you may have missed or been in the wrong directory when issuing the command below while following the poorly written tutorial.

sudo cp -a /etc/transmission-daemon/settings.json transmission-daemon/

If you didn't already remove the original you can resolve the problem by retracing your steps and reissuing the command after cd /home/user/.config/

If the file no longer exists you should re-install as suggested by Warpigs answer

0
-2

Try this

sudo apt-get --purge autoremove transmission-cli transmission-common transmission-daemon

and then...

sudo apt-get install transmission-cli transmission-common transmission-daemon

go to /etc/transmission-daemon/ and check if setting.json is back.

Not the answer you're looking for? Browse other questions tagged or ask your own question.