× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

How to update symlink?

bbaraniec
Luminary

How to update symlink?

Hi,

Should be simple but I just don't want to delete anything by mistake.
Currently having
lrwxrwxrwx   1 root  root     10 2011-08-18 18:56 Dropbox -> /c/Dropbox

How to update it to point another folder? Example /c/folder/Dropbox?
Message 1 of 16
sphardy1
Apprentice

Re: How to update symlink?

remove the link and recreate - just use rm on the link, it will not delete the target
Message 2 of 16
bbaraniec
Luminary

Re: How to update symlink?

I can't get this to work. No matter what I do.
I get alway double nested folder.
The dropbox folder where files are being synced is /c/.dropbox/Dropbox I have created a new share under frontview called Dropbox when I try to create symlink I getting /c/Dropbox/Dropbox and of course via cifs \\nas\Dropbox\Dropbox
Help me here please 🙂
Message 3 of 16
sphardy1
Apprentice

Re: How to update symlink?

What are you trying to achieve?
Message 4 of 16
bbaraniec
Luminary

Re: How to update symlink?

Ok. If you create a share under frontview let's say test, you can access it via cifs \\nas\test right? Now let's populate some files there.
Now you go and log via ssh and you will see in / directory ~test which is linked to /c/test right?
So if you go to ~test or /c/test you will see the same content.

I have installed dropbox under /c/.dropbox/ there are 3 subfolders:

- .dropbox - including *.db and pid files
- .dropbox-dist - including program files
- Dropbox - including synced files, so my personal stuff

I was looking for solution how to link /c/.dropbox/Dropbox to /c/Dropbox but everytime I made symlink the folder got nested /c/Dropbox/Dropbox
Message 5 of 16
WhoCares_
Mentor

Re: How to update symlink?

I guess what you want to do is:

cd /c
ln -sf /c/.dropbox/Dropbox Dropbox


-Stefan
Message 6 of 16
bbaraniec
Luminary

Re: How to update symlink?

And it's get's nested like /c/Dropbox/Dropbox/my files
Message 7 of 16
WhoCares_
Mentor

Re: How to update symlink?

bbaraniec wrote:
And it's get's nested like /c/Dropbox/Dropbox/my files


Can't be unless there's another Dropbox folder inside your Dropbox folder 😉
Once you made the symlink, what's the output of

cd /c
ls -al
ls -al ./Dropbox/


-Stefan
Message 8 of 16
bbaraniec
Luminary

Re: How to update symlink?

Stefan you are my hero, I forgot to delete to original folder that's why I got nested.
It's all correct now:
Nas:/c# ls -al ./Dropbox
lrwxrwxrwx 1 root root 19 2011-08-19 22:54 ./Dropbox -> /c/.dropbox/Dropbox
Message 9 of 16
WhoCares_
Mentor

Re: How to update symlink?

Great that it's working for you now! Have fun with your Dropbox - I wouldn't know how to live without it 😉

-Stefan

PS: Going to drive through your country of current residence in a couple of hours 😉
Message 10 of 16
bbaraniec
Luminary

Re: How to update symlink?

Cup of Coffee tomorrow then?:)
Now only thing I need is working script, I took this from dropbox forum:
#!/bin/sh
# dropbox service
DROPBOX_USERS="dropbox"

DAEMON=/c/.dropbox-dist/dropbox

start() {
echo "Starting dropbox..."
for dbuser in $DROPBOX_USERS; do
HOMEDIR=`getent passwd $dbuser | cut -d: -f6`
if [ -x $HOMEDIR/$DAEMON ]; then
HOME="$HOMEDIR" start-stop-daemon -b -o -c $dbuser -S -u $dbuser -x $HOMEDIR/$DAEMON
fi
done
}

stop() {
echo "Stopping dropbox..."
for dbuser in $DROPBOX_USERS; do
HOMEDIR=`getent passwd $dbuser | cut -d: -f6`
if [ -x $HOMEDIR/$DAEMON ]; then
start-stop-daemon -o -c $dbuser -K -u $dbuser -x $HOMEDIR/$DAEMON
fi
done
}

status() {
for dbuser in $DROPBOX_USERS; do
dbpid=`pgrep -u $dbuser dropbox`
if [ -z $dbpid ] ; then
echo "dropboxd for USER $dbuser: not running."
else
echo "dropboxd for USER $dbuser: running (pid $dbpid)"
fi
done
}

case "$1" in

start)
start
;;

stop)
stop
;;

restart|reload|force-reload)
stop
start
;;

status)
status
;;

*)
echo "Usage: /etc/init.d/dropbox {start|stop|reload|force-reload|restart|status}"
exit 1

esac

exit 0


But it's not working, maybe because I don't have dropbox specified in $PATH or maybe I should use full path? I tried both without luck.
Could I bother you again for help?:)
Message 11 of 16
WhoCares_
Mentor

Re: How to update symlink?

Try setting the DROPBOX_USERS variable in line 3 of the script to either "admin", your normal user account or (if all else fails) to "root". If you want it to outostart you also need to create another symlink: link the script to /etc/rc2.d/S98dropbox and make sure the original script itself is executable (chmod 755 <scriptname>).

-Stefan
Message 12 of 16
bbaraniec
Luminary

Re: How to update symlink?

Setting another user will create another instance of dropbox, I have it running under user dropbox already, there is something with path only
Message 13 of 16
sphardy1
Apprentice

Re: How to update symlink?

The startup script expects the daemon to be stored in the home directory of the user itself (it is referenced as $HOMEDIR/$DAEMON) and so your DAEMON=/c/.dropbox-dist/dropbox setting is invalid.

To fix, create another symlink to the .dropbox-dist directory in /c/home/dropbox and then change that script setting to the default: DAEMON=.dropbox-dist/dropbox
Message 14 of 16
jacklail
Aspirant

Re: How to update symlink?

i have a similar question about dropbox. I set up the same way using these instructions:

http://forums.dropbox.com/topic.php?id=9454&page=2&replies=37#post-345054

So I have a user: dropbox

My dropbox files that are synching are at: /c/dropbox/Dropbox

All well and good.

I would like to access that folder as a share. How do I create that. Frontview won't let me create a share with the name Dropbox becuase it is a user's name?

Anyway, not sure what the next steps should be.

Any guideance would be appreciated.
Message 15 of 16
jacklail
Aspirant

Re: How to update symlink?

never mind. It just took a bit for it to show up as a share in my network neighborhood. All is well, I think.
Message 16 of 16
Top Contributors
Discussion stats
  • 15 replies
  • 1506 views
  • 0 kudos
  • 4 in conversation
Announcements