Apache chown on its files not working


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Apache chown on its files not working
# 8  
Old 08-17-2016
You cannot give away user ownership of the file as a normal user. But you can change the group of that file if user ID 'apache' is part of 'btunix' group.
Otherwise add 'btunix' group as a secondary group of 'apache' user.
Code:
chgrp btunix /tmp/reference_file.csv

Ofcourse only 'root' user will be able to do the groupadd to 'apache' ID Smilie

Last edited by rinjohn; 08-17-2016 at 07:23 AM.. Reason: adding code
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Ubuntu

Apache not working

I have installed apache2 on ubuntu 16.00 and checked the logs and no errors apt list --installed | grep apache2 WARNING: apt does not have a stable CLI interface. Use with caution in scripts. apache2/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.5 amd64 ... (0 Replies)
Discussion started by: DOkuwa
0 Replies

2. UNIX for Dummies Questions & Answers

Subdomain is not working, debian, apache

Hi, I use debian jessie, apache. I am not allowed to post links here at this forum, I am new user. I made subdomain porodin.predicsasa.com and it is working, vhost file is porodin.conf in /etc/apache2/sites-available then I copied vhost file and made it hosting.conf, did a2ensite hosting and it... (5 Replies)
Discussion started by: alanford
5 Replies

3. Linux

Apache/2.2.25 VirtualHost not working

I am having problems in implementing the virtual hosts here in my server. I have this one cloud dev server: Amazon Linux AMI release 2013.03 (based on RHEL like CentOS) with Apache 2.2.25 installed and I'm trying to create 2 virtual hosts: test-kalc.tk and test2-kalc.tk. If I go to... (2 Replies)
Discussion started by: jpdoria
2 Replies

4. Red Hat

Find and Chown all files in a DIR except for Root

RHEL 6.3 Could someone tell me how to use the find and chown command to replace all files in a directory owned by user1 (for this example) and replace with user1:group1? Most importantly I dont want to change any files owned by root. I recently used the following command but it changed the root... (4 Replies)
Discussion started by: gps1976
4 Replies

5. Shell Programming and Scripting

Chmod working in sudo run script but chown isn't

My git user has permission in sudoers to run a wrapper script to move files into my webroot. Everything is working fine except for the chown line. After the script has run, the files ar still root:root instead of apache:apache. Scratching my head...:confused: #!/bin/sh echo echo "****... (4 Replies)
Discussion started by: dheian
4 Replies

6. Web Development

Apache to Tomcat forwarding not working properly

Hi, I am facing some problem with Apache to Tomcat forwarding. I have Tomcat (6.0.18) behind Apache (2.2). I want to use ‘https' for receiving request from the client. This request, when forwarded by Apache to Tomcat, will use ‘http'. My application's name is ‘abc', which is deployed in... (1 Reply)
Discussion started by: Technext
1 Replies

7. Linux

chown files/directories for multiple computers

I have a flash drive this I store files on, but I need the whole drive to be password protected. I was thinking of making the drive root permissions, but I'm not sure if that will need the root password of the computer from which I transfered the files from or the root password of the computer I'm... (1 Reply)
Discussion started by: Texasone
1 Replies

8. UNIX for Dummies Questions & Answers

CHOWN Multiple Files

We have a test and training directory. The test is a copy of training. We need to change the ownership and group for a list of specific files from the training directory. Is there a way to feed the CHOWN command the list of files we need changed? We are performing the CHOWN as root. Thanks in... (4 Replies)
Discussion started by: Teganii
4 Replies

9. UNIX for Dummies Questions & Answers

cannot access files in apache

i've never had this happen before, but i cannot access files from the shell in my apache server but i can see them on my localhost and by typing in my ip address in the url i can access and view files. not through the shell tho.... kumi@throne:/var/www % ls -l templates/decorative total 0... (3 Replies)
Discussion started by: visitorQ
3 Replies

10. UNIX for Dummies Questions & Answers

Apache Config Files

Currently our Apache log files are huge, I want to put say a month's time limit on this, then when it hits the end of the month I would like it to start over writing. Does anyone know where the config file is for this and what its called? I also want to do exactly the same on wtmp config (who... (1 Reply)
Discussion started by: Webwitch
1 Replies
Login or Register to Ask a Question
pidfilehack(8)						      System Manager's Manual						    pidfilehack(8)

NAME
pidfilehack - work around daemons that always fork SYNOPSIS
pidfilehack servicename pidfile command [parameters] DESCRIPTION
pidfilehack is used to work around daemons that insist on forking into the background, but that do write a correct pid file. pidfilehack forks the actual service, then waits for the pidfile to be written. Once it can read the pid from the pidfile it will tell minit the real pid and quit. USAGE
usually pidfilehack is symlinked as run command of a service. servicename the name of the service pidfilehack is installed for. pidfile the filename to read the pid from command the real command to start parameters additional parameters for the command A typical use of this command will look like this: /etc/minit/apache /etc/minit/apache/params apache /var/run/apache.pid apachectl start /etc/minit/apache/run -> /sbin/pidfilehack AUTHOR
minit was written by Felix von Leitner and can be downloaded from his page at http://www.fefe.de/minit/ This manpage was written by Erich Schubert <erich@debian.org> for the Debian GNU/Linux operating system. SEE ALSO
msvc(8), pidfilehack(8) pidfilehack(8)