You are not logged in.

#1 2010-01-06 21:42:37

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

[solved] autostart program as root (ddclient)

Hello, I need help here in newbie corner, because I feel myself like full newbie smile

I have setted up ddclient to update IP for my dyndns account. It should be started as root, but I don't know, how to do this. Simple "sudo ddclient" in .xinitrc with NOPASSWD in sudoers for ddclient binary looks like ugly trick. And that way is the only I know.
So how to do this correctly?

And as a bonus-question (I don't want to start new thread for this): where it is better to create root folder for ftp? I came from windows not so long ago, where I had a folder D:\ftp. But it seems that in linux with it's home folders must be some more elegant solution wink Please suggest me something.

TNX in advance.

Last edited by eDio (2010-01-06 23:16:52)

Offline

#2 2010-01-06 22:22:42

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: [solved] autostart program as root (ddclient)

As ddclient has an init-script, it should simply be a matter of adjusting DAEMONS in /etc/rc.conf:

DAEMONS=(... @ddclient ...)

For FTP, as far as I know home directories are the default, which seems like a perfectly sensible approach to me.  If you're trying to set up a chroot jail for users connecting via ftp, it will depend on the daemon you're using.  You might have to explain what it is you're trying to achieve.

Offline

#3 2010-01-06 23:11:19

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: [solved] autostart program as root (ddclient)

2 chpln
I was thinking that ddclient should be started as daemon, but as our wiki has no this section, I was not sure about this. Thank you.

As for ftp... I just want to have an ability to share some files with my friends in a simple way (what can be simpler for my friends, than just download a file). Under windows I had passive anonymous ftp. To share some file, I had to copy it to ftp directory and give direct link to a friend. So at the beginning, would be great to have at least something similar. But I see, there are some other tasty options, as different rights via authentication, etc., etc., etc. ... smile
I think, I have to read manuals by myself, as my question has no definite answer.

Thank you once more.

----

P.S. I have missed great article in our wiki http://wiki.archlinux.org/index.php/The … ot_process

Last edited by eDio (2010-01-06 23:16:31)

Offline

#4 2010-01-28 02:02:51

Horris
Member
Registered: 2009-04-05
Posts: 30

Re: [solved] autostart program as root (ddclient)

chpln wrote:

As ddclient has an init-script...

How dou you know that?

Thanks!

Offline

#5 2010-01-28 11:44:22

NSB-fr
Member
Registered: 2010-01-23
Posts: 45

Re: [solved] autostart program as root (ddclient)

eDio wrote:

/.../

As for ftp... I just want to have an ability to share some files with my friends in a simple way (what can be simpler for my friends, than just download a file). Under windows I had passive anonymous ftp. To share some file, I had to copy it to ftp directory and give direct link to a friend. So at the beginning, would be great to have at least something similar. But I see, there are some other tasty options, as different rights via authentication, etc., etc., etc. ... smile
I think, I have to read manuals by myself, as my question has no definite answer.

/.../

Hi,

Another solution if your file sharing is one way (ie your friend does not need to send file to you) is to use apache (or whatever webserver you like). And even that way a simple php script may allow your friends to upload files. You may also want to take a look at quickserve (I have not tested it yet).

Horris wrote:
chpln wrote:

As ddclient has an init-script...

How dou you know that?

Thanks!

You may find what init-script are available to you by doing

ls /etc/rc.d

Carpe Diem

Offline

Board footer

Powered by FluxBB