Monthly Archive: September 2013

How to give www-data (or any other user) sudo 0

How to give www-data (or any other user) sudo

Use visudo so you don’t completely destroy your PC. (Visudo will tell you there are any errors before you save [mistakes will permanently lock you out of your own PC].

visudo

Enter the details below then save..

www-data ALL=(ALL) ALL

 

If you wish to be more specific and give this user passwordless sudo for particular commands use the format

www-data ALL=(ALL) NOPASSWD: /sbin/shutdown, NOPASSWD: /sbin/reboot

 

How to login to a ftp server in linux 0

How to login to a ftp server in linux

From your command line type

ftp
ftp > open ftp.myserver.com

Or Alternatively,

ftp ftp.myserver.com

It will prompt you for a username and/or password and you can just fill those in.

After you are in, you can see a list of commands by using the command:

ftp> help
Commands may be abbreviated.  Commands are:

!               cr              mdir            proxy           send
$               delete          mget            sendport        site
account         debug           mkdir           put             size
append          dir             mls             pwd             status
ascii           disconnect      mode            quit            struct
bell            form            modtime         quote           system
binary          get             mput            recv            sunique
bye             glob            newer           reget           tenex
case            hash            nmap            rstatus         trace
ccc             help            nlist           rhelp           type
cd              idle            ntrans          rename          user
cdup            image           open            reset           umask
chmod           lcd             passive         restart         verbose
clear           ls              private         rmdir           ?
close           macdef          prompt          runique
cprotect        mdelete         protect         safe

If you are familiar with linux this should be fairly straight forward. The only ones Ill cover for anyone completely new are ls, get and put. (more…)