3

I installed xampp with no problems, and then ran the command to set security. Apparently setting security locks you out of the directories even at the file system level, not just via FTP - when I look at the permissions tab of my htaccess folder, for example, the owner is set to the ftp username. I can FTP, but unfortunately no matter what I set my default remote directory to in my FTP program, it takes me inside my htdocs folder and won't let me go up one level.

Because this is a dev server installed on my local machine, I'd really like to be able to move files around at the file system level through my file manager, rather than having to FTP. How can I set the permissions on the folders in question, when my actual Linux username doesn't have write access to the folders? Is there some way I can do it in terminal with sudo? Does the sudo command override any permissions set on a folder or file that locks out the standard user?

2 Answers 2

2

Simplest way:

  • Create a folder in your home folder called webroot (it can be called anything you like, but webroot or www would seem logical)
  • symlink the webroot folder in your home directory to the location of your xampp htdocs directory. sudo ln -s ~/webroot /path/to/xampp/htdocs
  • alternatively you can point the document root value (which i believe is found in httpd.conf - dont quote me on that, i only use xampp on windows and it may be different on linux) to point to the directory in your home folder.

You can then use the folder in your home directory as you would any other directory, since its in your home folder, and owned and created by you there shouldn't be any permissions problems. This will act as if you were placing the files in htdocs, so you can run php etc. files as you normally would. Ill also state that personally i use the lamp server available from the tasksel command, as i found theres generally more help available for this.

5
  • That sounds like what I need, but I'm not sure I'm doing this correctly. I created the symlink as you indicated, to a folder in my home dir called www. I put an html file in that folder; now how do I get to that file in my browser? I tried localhost/test.html, but it gave me a 404.
    – EmmyS
    Oct 21, 2010 at 19:13
  • 1
    apologies, a minor typo on my part, your symlink should read: sudo ln -s ~/webroot/* /path/to/htdocs This will link the contents of the folder instead of the folder itself. Before you do this you will need to delete the original symlink from htdocs. either run unlink webroot or just delete it via nautilus
    – richzilla
    Oct 21, 2010 at 20:04
  • Tried that; it's still giving me object not found. If I've put a file called linkTest.html in the webroot folder in my home folder, what URL should I be able to access it at?
    – EmmyS
    Oct 22, 2010 at 14:24
  • provided your xampp is running, it should be available at localhost/linkTest.html
    – richzilla
    Oct 22, 2010 at 14:30
  • xampp is running, and that URL is not available. So obviously I did something wrong with the linking.
    – EmmyS
    Oct 22, 2010 at 20:56
0

There's a lot of things that could affect this. I suspect that the ftp configuration is (rightly) restricting access. For assistance, guides and how-to's with XAMPP, please refer to their help forums.

1
  • I've already posted on their forums, but I was looking for some clarification on Linux permissions in general to illustrate.
    – EmmyS
    Oct 21, 2010 at 18:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .