[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Just got a Digital Ocean server. For a website, am I suppos
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 7
Thread images: 1
File: tips fedora.png (252 KB, 1024x640) Image search: [Google]
tips fedora.png
252 KB, 1024x640
Just got a Digital Ocean server.

For a website, am I supposed to make the files permissions owned by root, www-data, or user?

What is www-data anyway?

What happens if I fuck up permissions, can something go public that not supposed to have access?
>>
Files should be owned by the user.

www-data is the user under which Apache runs.

If you fuck up permissions you risk a lot more than private files going public.
>>
>>54738831
any examples?
>>
>>54738831
Well I installed Joomla to /var/www/html/joomla

Couldn't login, it gave error.

I did
sudo chown -R www-data:www-data /var/www/html/joomla


Now it works. Did I do it right?
>>
>>54738746
>files permissions owned by root
Only if you don't want anyone to see your site.

>What is www-data anyway?
User which apache runs as.

>What happens if I fuck up permissions, can something go public that not supposed to have access?
If it's in the web root, it's either public or you fucked up permissions and therefore it isn't.
Just put your libs and configs at least one level higher.
>>
>>54738882
www-data is the user that reads and executes files, it does not need to own them.

For example, your website could be vulnerable to an exploit of some kind where an attacker could upload malicious files or overwrite existing files if those files are owned by the apache user, you're gunna have a bad time.
>>
>>54738746
Just got an Ubuntu server there

It's Magento LAMP setup.
Thread replies: 7
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.