+ Post New Thread
Results 1 to 12 of 12
Raspberry Pi, Arduino & Other SBCs Thread, Move apache and proftpd directories in Technical; Can someone please explain how to move the root directories of the above two programs from /var/www to /media/usbflash. I ...
  1. #1
    hawc's Avatar
    Join Date
    May 2012
    Location
    Somewhere in one of the Shires.....
    Posts
    769
    Thank Post
    73
    Thanked 79 Times in 60 Posts
    Rep Power
    37

    Move apache and proftpd directories

    Can someone please explain how to move the root directories of the above two programs from /var/www to /media/usbflash.
    I am new to this stuff


    Thanks
    Harry

  2. #2


    Join Date
    May 2009
    Posts
    3,018
    Thank Post
    268
    Thanked 800 Times in 605 Posts
    Rep Power
    290
    Generally config files located under /etc. Apache is probably /etc/apache2/, proftpd might be under it's own folder or just a file.

    Appropriate google results might help : apache. Proftpd.

  3. Thanks to pcstru from:

    hawc (8th August 2013)

  4. #3
    hawc's Avatar
    Join Date
    May 2012
    Location
    Somewhere in one of the Shires.....
    Posts
    769
    Thank Post
    73
    Thanked 79 Times in 60 Posts
    Rep Power
    37
    Should I edit the config files or do a symbolic link?

  5. #4


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    I would edit the config to as to avoid confusion in the future.
    You may also need to make sure:
    The POSIX attributes are correct in the new directory.
    The extended attributes (if any) are correct.
    SELinux (or any other security features) are aware of the change.

  6. #5
    hawc's Avatar
    Join Date
    May 2012
    Location
    Somewhere in one of the Shires.....
    Posts
    769
    Thank Post
    73
    Thanked 79 Times in 60 Posts
    Rep Power
    37
    Quote Originally Posted by CyberNerd View Post
    You may also need to make sure:
    The POSIX attributes are correct in the new directory.
    The extended attributes (if any) are correct.
    SELinux (or any other security features) are aware of the change.
    How do I do this?

  7. #6


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    If you have any extended attributes
    Code:
    ls -l /var/www
    will show an @ at the end of the POSIX attributes on OSX and a + on Linux. I'm not sure about other unicies.
    Run
    Code:
    sestatus -v
    (linux) to see if selinux is enabled. If the command doesn't run it probably isn't installed.

  8. Thanks to CyberNerd from:

    hawc (8th August 2013)

  9. #7
    hawc's Avatar
    Join Date
    May 2012
    Location
    Somewhere in one of the Shires.....
    Posts
    769
    Thank Post
    73
    Thanked 79 Times in 60 Posts
    Rep Power
    37
    Do I need to tell mysql or php5 anything

  10. #8


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    They won't care where the web server files live and the database files won't be in /var/www unless its a very bizarre install!

  11. Thanks to CyberNerd from:

    hawc (9th August 2013)

  12. #9
    hawc's Avatar
    Join Date
    May 2012
    Location
    Somewhere in one of the Shires.....
    Posts
    769
    Thank Post
    73
    Thanked 79 Times in 60 Posts
    Rep Power
    37
    No they are not so it should be a smooth move

  13. #10


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    also check for hidden files that start with a dot. eg .htaccess

    ls -la

    make sure you copy the hidden files.

  14. #11
    hawc's Avatar
    Join Date
    May 2012
    Location
    Somewhere in one of the Shires.....
    Posts
    769
    Thank Post
    73
    Thanked 79 Times in 60 Posts
    Rep Power
    37
    Can someone help me with Phpmyadmin please. Should I uninstall it and then reinstall it. Will it end up in /medi/usbflash where I want it. I tried to move it but I get

    root@raspberrypi:/home/pi# mv -p /var/www /media/usbflash
    root@raspberrypi:/home/pi# mv /var/www /media/usbflash
    mv: cannot create symbolic link `/media/usbflash/www/phpmyadmin': Operation not permitted
    root@raspberrypi:/home/pi# cp -t /var/www/* /media/usbflash
    cp: target `/var/www/index.html' is not a directory
    root@raspberrypi:/home/pi# mv -f /var/www /media/usbflash
    mv: inter-device move failed: `/var/www' to `/media/usbflash/www'; unable to remove target: Is a directory
    root@raspberrypi:/home/pi# mv -f /var/www/* /media/usbflash/*
    mv: cannot create symbolic link `/media/usbflash/www/phpmyadmin': Operation not permitted

    I don't want a symbolic link. I want to move the files. That include PhpMyAdmin

  15. #12
    hawc's Avatar
    Join Date
    May 2012
    Location
    Somewhere in one of the Shires.....
    Posts
    769
    Thank Post
    73
    Thanked 79 Times in 60 Posts
    Rep Power
    37
    Any Help!

SHARE:
+ Post New Thread

Similar Threads

  1. PDA and Active Directory
    By localzuk in forum Windows
    Replies: 4
    Last Post: 10th October 2007, 03:54 PM
  2. Terrastation and active directory
    By edie209 in forum Windows
    Replies: 8
    Last Post: 27th September 2007, 02:46 PM
  3. TeraStation and Active Directory
    By mmoseley in forum Hardware
    Replies: 4
    Last Post: 6th September 2007, 01:28 PM
  4. Exchange Server 2007 and Active Directory
    By MarkB in forum Windows
    Replies: 7
    Last Post: 16th April 2007, 10:53 AM
  5. Wireless bridgeing and Active directory replication
    By HodgeHi in forum Wireless Networks
    Replies: 5
    Last Post: 7th February 2007, 12:12 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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