How to make a public folder within a private folder?
My Linux username is "virchanza" and my group is "virchanza". Here's how my home folder looks:
Code:
virchanza$ ls -alhd /home/virchanza Inside my home folder, I want to create a publicly accessible folder called "public_stuff": Code:
virchanza$ cd Code:
virchanza$ cd public_stuff Code:
virchanza$ cd /home How do I make a publicly-accessible folder within my private home folder? |
In order for someone to see a file a few permissions need to be in place:
First, they have to have access to the file itself which you've done. Second, All the directories leading to that file must be executable by the person who wants to browse to this file. I would recommend setting up a public location in a common directory rather than in your home directory for this purpose. Regards, Alunduil |
Hey Alunduil thanks a lot for your reply.
I got everything working the way I wanted it. The "public folder" which I want to keep inside my private home folder actually contains the files for my website (I have a web server demon running on my machine) . I want to keep my website files within my home folder. I added "o+x" to my home folder permissions so now everything is working fine (people can navigate into my home folder but they are unable to view its contents because I didn't specify "o+r" for my home folder). Thanks a lot for your help! Virchanza |
No problem. Just for further edification:
* If you would ever need to delete that user (which I doubt you would) you don't want to delete the user's information because now the website would be deleted as well. * Setting up websites that are accessible in this manner is typically best solved by setting up the website in a www directory (usually in /var) and then symlinking that directory into the home directory. I'm glad everything is working just wanted to provide a couple of alternatives. Regards, Alunduil |
All times are GMT -5. The time now is 12:31 PM. |