{"id":18,"date":"2018-04-10T08:38:00","date_gmt":"2018-04-10T03:08:00","guid":{"rendered":"https:\/\/www.onlinenote.in\/linux\/?p=18"},"modified":"2019-05-02T11:22:28","modified_gmt":"2019-05-02T05:52:28","slug":"how-to-make-apache-run-as-current-user","status":"publish","type":"post","link":"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/","title":{"rendered":"How to make Apache run as current user"},"content":{"rendered":"<pre class=\"lang:default decode:true \">sudo adduser {username} www-data<\/pre>\n<p>or<\/p>\n<p>Edit the following file as root: \/etc\/apache2\/envvars<\/p>\n<p>using the command:<\/p>\n<pre class=\"lang:default decode:true \">sudo nano \/etc\/apache2\/envvars<\/pre>\n<p>change the user and group to yourself if there is only one user and you will never have permissions problems again.<\/p>\n<p>I.E., if you are only logging in and running the server as user &#8216;big_dog&#8217;:<\/p>\n<pre class=\"lang:default decode:true \">export APACHE_RUN_USER=big_dog\r\nexport APACHE_RUN_GROUP=big_dog<\/pre>\n<p>Heck, for that matter you could change that user to the current user I&#8217;m sure somehow. Then, install user_dir you all have webs only you can have full control of (unless you modify this).<\/p>\n<p>Restart the server (if unsure, just reboot or goole) and you are good to go.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>sudo adduser {username} www-data or Edit the following file as root: \/etc\/apache2\/envvars using the command: sudo nano \/etc\/apache2\/envvars change the user and group to yourself if there is only one user and you will never have permissions problems again. I.E., if you are only logging in and running the server as user &#8216;big_dog&#8217;: export APACHE_RUN_USER=big_dog [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.10 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to make Apache run as current user - linux<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to make Apache run as current user - linux\" \/>\n<meta property=\"og:description\" content=\"sudo adduser {username} www-data or Edit the following file as root: \/etc\/apache2\/envvars using the command: sudo nano \/etc\/apache2\/envvars change the user and group to yourself if there is only one user and you will never have permissions problems again. I.E., if you are only logging in and running the server as user &#8216;big_dog&#8217;: export APACHE_RUN_USER=big_dog [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/\" \/>\n<meta property=\"og:site_name\" content=\"linux\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-10T03:08:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-02T05:52:28+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/\",\"url\":\"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/\",\"name\":\"How to make Apache run as current user - linux\",\"isPartOf\":{\"@id\":\"https:\/\/www.onlinenote.in\/linux\/#website\"},\"datePublished\":\"2018-04-10T03:08:00+00:00\",\"dateModified\":\"2019-05-02T05:52:28+00:00\",\"author\":{\"@id\":\"\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.onlinenote.in\/linux\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to make Apache run as current user\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.onlinenote.in\/linux\/#website\",\"url\":\"https:\/\/www.onlinenote.in\/linux\/\",\"name\":\"linux\",\"description\":\"Code Snippets\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.onlinenote.in\/linux\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to make Apache run as current user - linux","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/","og_locale":"en_US","og_type":"article","og_title":"How to make Apache run as current user - linux","og_description":"sudo adduser {username} www-data or Edit the following file as root: \/etc\/apache2\/envvars using the command: sudo nano \/etc\/apache2\/envvars change the user and group to yourself if there is only one user and you will never have permissions problems again. I.E., if you are only logging in and running the server as user &#8216;big_dog&#8217;: export APACHE_RUN_USER=big_dog [&hellip;]","og_url":"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/","og_site_name":"linux","article_published_time":"2018-04-10T03:08:00+00:00","article_modified_time":"2019-05-02T05:52:28+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":"","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/","url":"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/","name":"How to make Apache run as current user - linux","isPartOf":{"@id":"https:\/\/www.onlinenote.in\/linux\/#website"},"datePublished":"2018-04-10T03:08:00+00:00","dateModified":"2019-05-02T05:52:28+00:00","author":{"@id":""},"breadcrumb":{"@id":"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.onlinenote.in\/linux\/how-to-make-apache-run-as-current-user\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.onlinenote.in\/linux\/"},{"@type":"ListItem","position":2,"name":"How to make Apache run as current user"}]},{"@type":"WebSite","@id":"https:\/\/www.onlinenote.in\/linux\/#website","url":"https:\/\/www.onlinenote.in\/linux\/","name":"linux","description":"Code Snippets","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.onlinenote.in\/linux\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":""}]}},"_links":{"self":[{"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/posts\/18"}],"collection":[{"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":1,"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":19,"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/posts\/18\/revisions\/19"}],"wp:attachment":[{"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/tags?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}