Results 1 to 7 of 7

Thread: FTP and appache question

  1. #1
    Join Date
    Apr 2008
    Beans
    20

    FTP and appache question

    Hi, I just have some questions concerning proftpd. I recently (yesterday hehe) installed a LAMP server with openssh on my sisters' old hp. For file transfer purpose, I decided to instal proftpd as well but here the thing.

    I wondered, would there be a more efficient way to tansfer file to /var/www then ftping them to /home/user/ and then moving them using ssh?

    Also what permission should my files in /var/www have? right now they are at 644 but if I intend to put PHP shouldn't I set it at 755?

    Thanks in advance!

  2. #2
    Join Date
    Apr 2008
    Location
    Belgium
    Beans
    124
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: FTP and appache question

    For this purpose you could for instance make a symbolic link to your home folder in the www directory:
    Code:
    ln -s /home/user /var/www
    .

  3. #3
    Join Date
    Jan 2007
    Location
    ~/PA/USA
    Beans
    1,983
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: FTP and appache question

    I run a home LAMP server with a FQDN (somewhere.com) and I configure my site off of my laptop computer befor I submit changes to my server. When the time comes to update my site I use Rsync to sync my laptop with my server.

    On a command line from my laptop I use:
    Code:
    rsync -e "ssh -ax" -avz --delete --stats /var/www/mysite/ webadmin@mysite.com:/var/www/mysite
    Using the rsync method only updates the changed files.

    Then of course I have to copy the database to the server as well:
    from my laptop
    Code:
    mysqldump -u user -p database > database.new
    Then copy my database to the server:
    Code:
    scp database.new user@mysite.com:/var/www/mysite
    Hope this helps ya...
    Last edited by cdtech; April 29th, 2008 at 08:55 PM.

  4. #4
    Join Date
    Apr 2008
    Beans
    20

    Re: FTP and appache question

    All right. But for learning purpose, could you explain me what a symbolic does?

  5. #5
    Join Date
    Apr 2008
    Beans
    20

    Re: FTP and appache question

    Also what permission should my files in /var/www have?

  6. #6
    Join Date
    Jan 2007
    Location
    ~/PA/USA
    Beans
    1,983
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: FTP and appache question

    Quote Originally Posted by mam00th View Post
    Also what permission should my files in /var/www have?
    I use 775 so the group has access to change files as well. If your the only owner or group of the /var/www directory then 755 is more secure.

    In Linux and Unix, everything is a file. Directories are files, files are files and devices are files. Devices are usually referred to as a node; however, they are still files. All of the files on a system have permissions that allow or prevent others from viewing, modifying or executing. If the file is of type Directory then it restricts different actions than files and device nodes.
    From: FilePermissions Ubuntu Documentation
    Last edited by cdtech; April 29th, 2008 at 10:20 PM.

  7. #7
    Join Date
    Nov 2009
    Beans
    22

    Re: FTP and appache question

    Also what permission should my files in /var/www have? right now they are at 644 but if I intend to put PHP shouldn't I set it at 755?
    Your script should work. If it doesn't work with 644 then try setting more rights. Less rights directory or fire have more secure it is.)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •