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.
Ofcourse only 'root' user will be able to do the groupadd to 'apache' ID
Last edited by rinjohn; 08-17-2016 at 07:23 AM..
Reason: adding code
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT NETBSD
chgrp
CHGRP(1) BSD General Commands Manual CHGRP(1)NAME
chgrp -- change group
SYNOPSIS
chgrp [-R [-H | -L | -P]] [-fhv] group file ...
DESCRIPTION
The chgrp utility sets the group ID of the file named by each file operand to the group ID specified by the group operand.
Options:
-H If the -R option is specified, symbolic links on the command line are followed. (Symbolic links encountered in the tree traversal
are not followed.)
-L If the -R option is specified, all symbolic links are followed.
-P If the -R option is specified, no symbolic links are followed.
-R Change the group ID for the file hierarchies rooted in the files instead of just the files themselves.
-f The force option ignores errors, except for usage errors and doesn't query about strange modes (unless the user does not have proper
permissions).
-h If file is a symbolic link, the group of the link is changed.
-v Cause chgrp to be verbose, showing files as they are processed.
If -h is not given, unless the -H or -L option is set, chgrp on a symbolic link always succeeds and has no effect. The -H, -L and -P options
are ignored unless the -R option is specified. In addition, these options override each other and the command's actions are determined by
the last one specified.
The group operand can be either a group name from the group database, or a numeric group ID. Since it is valid to have a group name that is
numeric (and doesn't have the numeric ID that matches its name) the name lookup is always done first. Preceding the ID with a ``#'' charac-
ter will force it to be taken as a number.
The user invoking chgrp must belong to the specified group and be the owner of the file, or be the super-user.
Unless invoked by the super-user, chgrp clears the set-user-id and set-group-id bits on a file to prevent accidental or mischievous creation
of set-user-id or set-group-id programs.
The chgrp utility exits 0 on success, and >0 if an error occurs.
FILES
/etc/group Group ID file
SEE ALSO chown(2), lchown(2), fts(3), group(5), passwd(5), symlink(7), chown(8)STANDARDS
The chgrp utility is expected to be POSIX 1003.2 compatible.
The -v option and the use of ``#'' to force a numeric group ID are extensions to IEEE Std 1003.2 (``POSIX.2'').
BSD September 25, 2003 BSD