Questions tagged [www-data]

Default user under which apache web server is run on Debian-based systems.

Filter by
Sorted by
Tagged with
0 votes
1 answer
183 views

Unable to List Contents or Create Files in /var/tmp Folder from PHP Executed Bash Script

Objective: I want to trigger a webhook on a private linux-machine (its a local system not connected to internet), which can delete the spool data generated by CUPS server in /var/tmp folder. To ...
Sheikh Muhammed Tadeeb's user avatar
1 vote
1 answer
689 views

Restart rspamd.service as non-root user

I have webpage with button, when user clicks on button, script restart.sh on server is executed. This script contains: #!/bin/bash systemctl restart rspamd.service After clicking on the button, ...
MTC11's user avatar
  • 11
1 vote
1 answer
2k views

php processes stil running under www-data after configuring php-fpm

Would appreciate any help, I am at my wits end. Objective: Configure php-fpm so I can have multiple websites on the same server that do not have write access to one another, and have php-fpm run as ...
bjammin's user avatar
  • 11
0 votes
1 answer
255 views

Security implications of having less permission restrictions on a group than owner in Unix?

I have an Ubuntu server that's currently hosting a WordPress site using an Apache web server, MySQL and PHP etc. Additionally I have configured VSFTPD and SSH to handle FTPS (implicit FTPS) and SFTP ...
willowen100's user avatar
0 votes
1 answer
492 views

Control a systemd service through a web application built in python3

I have created a web app in python3 which is hosted on an apache2 web server using the WSGI module. Now one of the requirements of the web application is that it needs to restart a systemd service ...
DG12's user avatar
  • 1
0 votes
1 answer
48 views

Is it normal if www-data user run more than 1

Today I track my server performance and I found that www-data user is running more than 1 and it use a lot of cpu usage. Can I know is it normal? and if it is not normal can you guys suggest what ...
aj17's user avatar
  • 3
0 votes
1 answer
302 views

Run custom script as root user after completion of www-data user script

I have the following script to update the price, stocks and thereafter refresh the cache. File: /var/scripts/update-web.sh #!/bin/bash echo "$(date)" echo "\n" echo ======================= Updating ...
MagePsycho's user avatar
1 vote
1 answer
4k views

PHP Script and correct permissions for user to change everything

The network configuration doesn't allow access to FTP from outside the building. There's one user that need to upload and change files from a specific folder so I've installed TinyFileManager https://...
Enrique Becerra's user avatar
0 votes
2 answers
3k views

BASH-create a 'www-data' crontab that runs a PHP file

I need to get this to run in a cron file in /etc/cron.d/: */15 * * * * php -f /var/www/nextcloud/cron.php ...but, my scripts don't run. It's permissions are set to 644 and I need to create it with a ...
Jesse's user avatar
  • 245
0 votes
1 answer
1k views

PHP 7 FPM checkconf is throwing invalid user: ‘www-data:www-data’, but I'm not using a www-data user

I'm using a different user for my web services. Screw convention. I don't have www-data set in any php config files: $ grep -rnw /etc -e 'www-data' $ But I'm still getting this error: $ ...
ki9's user avatar
  • 1,323
1 vote
1 answer
251 views

Properly using www-data to add/edit/remove safely

After building a LAMP stack, it's my understanding that Apache creates a www-data user. But you can't directly log in as www-data (security reasons). Instead, if you want to do something as www-data ...
Craig's user avatar
  • 165
0 votes
1 answer
469 views

520 `recv() failed` only when running application as www-data

I'm running a nginx proxy server that fronts a SignalR application with thousands of connected WebSocket clients. To accommodate all of these connections, I have set the following in nginx.conf: ...
kspearrin's user avatar
  • 493
0 votes
1 answer
2k views

How can a hacker compromising the www-data user account install a rootkit?

Recently a site of mine was hacked. For sure the attacker can execute PHP and start an interactive shell, etc. I understand a hacker can delete files, or delete DB, the site folder, write in the cron ...
Beto Aveiga's user avatar
7 votes
1 answer
1k views

Postfix pipe always runs as nobody

The problem I would like postfix to pipe emails to a script that operates on files owned by the www-data group located under /var/www/. However, I receive error messages that indicate insufficient ...
PhilippVerpoort's user avatar
1 vote
1 answer
1k views

How to set up secure permissions: Multiple Users & Websites / Apache / www-data

I had my own private VPS that my hosting service managed and now I am switching to a cloud server where I have to manage everything myself. I am trying to mimic their secure setup that they had. On my ...
peppy's user avatar
  • 73
3 votes
2 answers
344 views

How can I keep one hacked website on my server from compromising the other websites?

I'm a teaching assistant in software security and running a server that is vulnerable by design. It's an nginx server, and it has 40 ports open. Each port serves a web application, and all the web ...
Magnus's user avatar
  • 255
1 vote
0 answers
451 views

Permissions in folder owned by group www-data

I run apache2 webserver on Debian 9 and root of that web is located in /srv/www/, I am logged as user tomsk, problem is that I don't have a permissions in /srv/www/ because it is owned by www-data ...
tomsk's user avatar
  • 297
3 votes
3 answers
7k views

Insecure Connection: issue on www redirect to non-www with https

I am not much familiar with server configurations, please help me on this issue: I have a Debian8 server and a SSL certificate, the SSL certificate only for My non-www domain so I would like to ...
Riyas Muhammed's user avatar
0 votes
1 answer
1k views

apache2 server no permission on new directory

I am setting up an apache2 server on my server. I wanted to use another directory then /var/www. I created the directory /web added my user to the www-data group changed the owner/group and the ...
Apatus's user avatar
  • 21
-1 votes
1 answer
968 views

Executing external file as www-data (Ubuntu 16.04)

I want to start a virtual machine through PHP, but i've had no luck. Here's what i've got. <?php if(isset($_POST['btn_start'])){ echo shell_exec('whoami'); echo exec('virsh start winagain'); }...
Jake Kirby's user avatar
2 votes
1 answer
2k views

How to use NVM to switch Node versions for the Apache user ('www-data') - a user with severely limited functionality?

I call a Node script from PHP on my Ubuntu web server, as in // The following PHP executes in the context of the Apache user - 'www-data' // $execstring = "node " . $args; exec($execstring, $output, ...
Dan Nissenbaum's user avatar
2 votes
1 answer
2k views

Set umask 0002 for apache user: www-data

I'm running ubuntu 14.04 and would like to have apaches www-data user to create files that are writable by all users within that same group www-data. So far I've tried to add umask 0002 or umask 002 ...
jrn's user avatar
  • 123
3 votes
2 answers
807 views

www-data security issue across multiple sites in a vps

I recently bought a VPS and learned a lot from it. I manged to create an ftp user, set it as the owner of my site's document root, add it to the www-user group, set the group as the group of the ...
Nandakumar Edamana's user avatar
-1 votes
1 answer
75 views

PHP: how to write a file when no permissions are granted to www-data user [closed]

I have a WEB-page on Apache/2.2.9 (Debian) server located in .../public_html I am a user with no root preveligies. I rewrote my site in PHP and noticed that it cannot write files in ../public_html I ...
Iaroslav's user avatar
0 votes
1 answer
1k views

Can't create files with `ubuntu` user under `/var/www`

I've added ubuntu user to the www-data group and set the folder permissions as follows: sudo gpasswd -a "$USER" www-data find /var/www -type f -exec chmod 0640 {} \; sudo find /var/www -type d -exec ...
Arman H's user avatar
  • 101
0 votes
1 answer
802 views

give www-data the permission to write into /home and others root directories

I have a big problem since few days with permissions on my Symfony2 application. The background : I write a PHP app with symfony2 which gives an overview of many Moodle instances on each servers ...
Florian Doyen's user avatar
2 votes
1 answer
1k views

Nginx + GUnicorn + Flask + www-data user - file lockdown

I have some pretty basic questions about I am deploying a Flask application in Gunicorn (19.0-1) on Ubuntu (14.10) in combination with Nginx. Since this app sits along side to Web2Py, I followed a ...
Donal Lafferty's user avatar
0 votes
1 answer
485 views

How to run php exec for nested scripting on remote machines?

I originally asked this question stackEx, and realized it was a much better fit here. I'm trying to automate the deployment of services on a cluster of hosts from a web-server. I've evoked the php ...
pl3bs's user avatar
  • 25
0 votes
1 answer
173 views

How do I create files in directory owned by user in same group without sudo?

I have created a user to own website files (drupal) and added that user to www-data, so essentially all files are drupaluser:www-data. I want to go in and put the site in to git but I get permission ...
user1963898's user avatar
1 vote
0 answers
92 views

Apache and users write permission issues

On my web server I have two distinct folders, /home/dev/ and /home/prod/, each containing several websites. As you can guess, each directory is owned by the corresponding user, devand prod. The ...
Bertrand's user avatar
  • 111
0 votes
1 answer
878 views

Allow dev user to edit files that sometimes belong to www-data

This question has been asked time and time again but none of the answers seem to answer my specific question - either that or I'm not getting it. Anyway, as per the title, I'm trying to limit our web ...
Touff's user avatar
  • 183
0 votes
1 answer
3k views

Checking the history of www-data user [closed]

While normal users have a .bash_history in their home directory, the www-data user does not have a home directory. As such, are there any means to track the history of the www-data user?
Reuben L.'s user avatar
  • 111
1 vote
1 answer
630 views

Find a script which writes in /var/tmp [duplicate]

I discover that one of my partition was full. rootfs 20G 1,8G 17G 10% / /dev/root 20G 1,8G 17G 10% / devtmpfs 7,8G 184K 7,8G 1% /dev none ...
Raphaël's user avatar
  • 143
0 votes
1 answer
771 views

/usr/sbin/apache2 -k start command in HTOP running consistently. Is it a bot?

I have got a VPS with six websites running on it. None of them get very much traffic at all, maybe 10-20 a day each. As far as I am aware, /usr/sbin/apache2 -k start should represent a user hitting a ...
Eric's user avatar
  • 37
4 votes
1 answer
6k views

FTP user with home /var/www and group www-data has no write permission to /var/www

I have problems giving my FTP user who does not have sudo rights, write permission to /var/www. Question: How can I give the FTP user write permission to /var/www & subfolders only? ls -ld says:...
user avatar
1 vote
1 answer
669 views

www-data and server user

I have a WordPress installation on my first VPS, and ownership problem with www-data user and user I created (let's call it user1) to use for login (I disabled root login). I use user1 for FTP, but I ...
user207799's user avatar
0 votes
0 answers
50 views

Scripts not running as www-data on Ubuntu Server

I have a dedicated server running Ubuntu 10.04 LTS. Every other apache setup I've used defaults to running scripts as www-data. This one, however, is running everything as my username on the server ...
CoderJK's user avatar
  • 113
2 votes
1 answer
457 views

Web server users and groups

I've set up a web server of which will host sites for multiple clients, each client will have their own user and the files for their website(s) will exist within /var/www. We deploy code via a ...
Ben Everard's user avatar
1 vote
0 answers
1k views

How do I allow www-data to (negatively) change the niceness of a process in Linux?

So I'm running a website using django and sometimes I call scripts located on the server by spawning a subprocess in python. When looking at the processes with "top" I see these are called under the ...
user1561753's user avatar
1 vote
1 answer
131 views

Debian virtualenv location

I have a question that I would appreciate some help with. I want to run a number of sites from my debian server, each with their own virtualenv. Should I be creating my virtualenv in the www-data or /...
J.Zil's user avatar
  • 1,123
-1 votes
1 answer
715 views

www-data runs in terminal but in php it does not execute, apache2, debian squeeze [closed]

I have external program.exe inside my website that gets data from text file, process it and then output to another textfile. Since apache uses www-data as user account, i manage to log in to terminal ...
Nehemiah's user avatar
1 vote
2 answers
2k views

Does changing the home directory of www-data break anything (esp. apache)?

We're running on Ubuntu and have an Apache2 webserver with some apps that require cron-jobs installed. The cron jobs occasionally send mails which of course goes to the www-data user. The home dir of ...
thoni56's user avatar
  • 123
13 votes
1 answer
17k views

Chown in sudoers file : Safe or not?

Is it safe to add this command in sudoers file? mike ALL= NOPASSWD:/bin/chown -R www-data\:www-data /var/www and this is the only command that I want to run $mike@ubuntu: sudo chown -R www-data:www-...
Mike's user avatar
  • 145
2 votes
3 answers
20k views

How do I change www-data home directory from /var/www to /home/www-data?

I'm setting up a private Ubuntu web server. In my company I'm used to a deployment where the home folder of www-data is in /home/www-data, but on my plain Ubuntu installation it is in /var/www. Now ...
sspross's user avatar
  • 151
0 votes
1 answer
833 views

Getting Redmine integrated with svn while running passenger as user www-data

I'm having some problems getting passenger and svn to work in Redmine. System Ubuntu 12.04 Apache 2.2.22 PassengerRuby 1.9.1 Passenger 3.0.19 Problem When I let Passenger do it's normal user ...
luddet's user avatar
  • 101
3 votes
2 answers
13k views

Should I add the user www-data? Trying to get Rails off the ground

I'm trying to set up a Rails application on a redhat server, and in accordance with instructions I have found on multiple tutorials, I wish to set the owner of certain directories to 'www-data' so ...
Jellicle's user avatar
  • 324
5 votes
3 answers
863 views

The 301 'www' nightmare. How do I change back?

About six months ago, I decided it would be best to put my website on the naked domain, let's just say 'example.com'. I did what all the instructions websites have told me with adding a 301 redirect ...
Anthony's user avatar
  • 51
3 votes
3 answers
209 views

Basic clarification about Limited FTP/sFTP users

I would like to get some clarification about the correct way to create limited users to access to my VPS user as WEBSERVER with Nginix. I'm used to NOT install FTP and access via SFTP only. It is ok ...
mattewre's user avatar
1 vote
1 answer
1k views

chgrp to group I am not a member of

I'm creating git repositories, ldap accounts and ldap groups using PHP application. Everything works fine, but I have a problem to set right permissions to git repositories. Every ldap user is a ...
Peter Krejci's user avatar
1 vote
1 answer
3k views

Using www-data through SSH

For development purposes I'm using www-data (on an ubuntu 11.10 server) to ssh in and fire git commands and basic stuff against the webroot. I don't have things like command history, coloring, etc ...
Fluidbyte's user avatar
  • 119