0

I used sudo adduser to add a new user for webmaster, so I set home directory to /var/www to let this user have rights to save file on the web server.

I just realized that I use webmaster account to log in the computer, Ubuntu created all directory for home like Documents, Download folders etc...

Since those folders Ubuntu created on the /var/www folder are public folder, I would like to know can I delete those folders or I have leave there for the folders system created.

Your help and information is great appreciated,

Regards,

Inung

1
  • 4
    You can delete them, but many will be re-created as long as you continue to use /var/www as $HOME. Probably best to re-think your strategy. See askubuntu.com/questions/46331/…
    – Panther
    May 14, 2014 at 16:22

1 Answer 1

0

If you're certain you don't need those folders then using sudo privileges you should be able to delete the folders as you would do any others.

sudo rm -r /var/www/Documents/

If you're concerned about doing this then look into a .htaccess file to prevent other people from being able to view your folders.

1
  • All the config files will simply be re-created when the user logs in. Perhaps not Desktop or Documents, depends on if they use a desktop environment to log in. But most .config files or .cache will keep "regenerating" as needed. .htaccess is a potential solution for web servers that use .htaccess .
    – Panther
    May 14, 2014 at 17:41

You must log in to answer this question.

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