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
Apache::Singleton(3pm)					User Contributed Perl Documentation				    Apache::Singleton(3pm)

NAME
Apache::Singleton - Singleton class for mod_perl VERSION
version 0.15 SYNOPSIS
package Printer; # default: # Request for mod_perl env # Process for non-mod_perl env use base qw(Apache::Singleton); package Printer::PerRequest; use base qw(Apache::Singleton::Request); package Printer::PerProcess; use base qw(Apache::Singleton::Process); DESCRIPTION
Apache::Singleton works the same as Class::Singleton, but with various object lifetime (scope). See Class::Singleton first. OBJECT LIFETIME
By inheriting one of the following sublasses of Apache::Singleton, you can change the scope of your object. Request use base qw(Apache::Singleton::Request); One instance for one request. Apache::Singleton will remove instance on each request. Implemented using mod_perl "pnotes" API. In mod_perl environment (where $ENV{MOD_PERL} is defined), this is the default scope, so inheriting from Apache::Singleton would do the same effect. NOTE: You need "PerlOptions +GlobalRequest" in your apache configuration in order to use the Request lifetime method. Process use base qw(Apache::Singleton::Process); One instance for one httpd process. Implemented using package global. In non-mod_perl environment, this is the default scope, and you may notice this is the same beaviour with Class::Singleton ;) So you can use this module safely under non-mod_perl environment. CREDITS
Original idea by Matt Sergeant <matt@sergeant.org> and Perrin Harkins <perrin@elem.com>. Initial implementation and versions 0.01 to 0.07 by Tatsuhiko Miyagawa <miyagawa@bulknews.net>. SEE ALSO
Apache::Singleton::Request, Apache::Singleton::Process, Class::Singleton SOURCE
The development version is on github at http://github.com/mschout/apache-singleton <http://github.com/mschout/apache-singleton> and may be cloned from git://github.com/mschout/apache-singleton.git <git://github.com/mschout/apache-singleton.git> BUGS
Please report any bugs or feature requests to bug-apache-singleton@rt.cpan.org or through the web interface at: http://rt.cpan.org/Public/Dist/Display.html?Name=Apache-Singleton AUTHOR
Michael Schout <mschout@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2009 by Michael Schout. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-04-02 Apache::Singleton(3pm)