Creating a file where the owner and group is not root
Hi,
I'm the root user on my computer, but I'm writing a script that does a lot of file handling. Every time I create a file or directory it automatically requires root privileges. Is there a way I can just create a file that the user can access without a password?
For example in my script I write
How do I unzip test.zip to user friendly permissions?
Thanks
Moderator's Comments:
Please use next time code tags for your code and data
I am bit unclear of how Linux was set in the real world, please advise me how it's supposed to be.
When I log in as root and do a ls -l, I find: /boot, /, /var, /usr, /tmp, /home, /u01, /u02, /u03 and of of this partition is owned by root and the group also belong to root. Is that the way it's... (1 Reply)
Hi,
I don't know how the owner & group of a login file in redhat linux 7.2 changed to bache like,
-rwxr-xr-x 1 bache bache 17740 Jun 20 02:05 login
I am trying to change the owner and group to root by using
#chown root login
#chgrp root login
But i am getting the error ... (7 Replies)
hello
I search a script (ksh for Aix 5.3) to save all permissions, groups and owner for all files. Because we work much to change it, and a mystake ......!
So i want execute this script to save/ execute permissions for all files.
If you have this script, thank you for your help ;)
best... (2 Replies)
How to set the name of the group and the owner while creation of the file?
-rwxrwxr-x 1 root sys 1202 Dec 5 2002 abc.awk
like here i need to set the name of root and sys to xxx xxx
Any help is appreciated.
Thanks. (2 Replies)
Hi,
We have almost 45,000 data files created by a script daily. The file names are of format-ODS.POS.<pharmacyid>.<table name>.<timestamp>.dat. There will be one data file like this for each pharmacy and each table.(Totally around 45,000)
The requirement is to create a control file for each... (2 Replies)
How would I find out who the group openers is of a file? For example:
> ls -l myfile
-rwxr-xr-x 1 myronp hawks 20125 Oct 20 20:50 myfile
How do I return just hawks. I could do this with a series of cut or awk, but is there a more direct way.
The ls -g is better, but still... (1 Reply)
If I have to identify the group owner of an AIX group, what is the command to be used. Example: there is an mqadm group, how do I find the owner of this group?
Please help. (6 Replies)
Dears
it is normal that the below binaries stay without any owner and group
I have checked it in many servers and the like the below
/usr/lpp/bos.net/inst_root/etc/ipsec# ls -lrt
total 248
-r-xr-xr-x 1 987 987 13589 Jun 29 2005 default_group
-r-xr-xr-x ... (5 Replies)
Hi Team,
Am a newbie to Unix. As I would like to see the Server Name,Owner Name ( not numeric form), Group Name ( not numeric ID), ROOT path.
I would like to send this list as an attachment to my personal mail. Can any one please help me out to to resolve this .
Here is the sample result... (6 Replies)
Discussion started by: vasuvv
6 Replies
LEARN ABOUT OPENSOLARIS
fbtab
logindevperm(4) File Formats logindevperm(4)NAME
logindevperm, fbtab - login-based device permissions
SYNOPSIS
/etc/logindevperm
DESCRIPTION
The /etc/logindevperm file contains information that is used by login(1) and ttymon(1M) to change the owner, group, and permissions of
devices upon logging into or out of a console device. By default, this file contains lines for the keyboard, mouse, audio, and frame buffer
devices.
The owner of the devices listed in /etc/logindevperm is set to the owner of the console by login(1). The group of the devices is set to the
owner's group specified in /etc/passwd. The permissions are set as specified in /etc/logindevperm.
If the console is /dev/vt/active, the owner of the devices is the first user logged in on the consoles (/dev/console or /dev/vt/#). Upon
this first user's logout the owner and group of these devices is reset by ttymon(1M) to owner root and root's group as specified in
/etc/passwd.
Fields are separated by a TAB or SPACE characters. Blank lines and comments can appear anywhere in the file; comments start with a hash-
mark, (#), and continue to the end of the line.
The first field specifies the name of a console device (for example, /dev/console). By default, it is /dev/vt/active, which points to the
current active console, including /dev/console and all virtual consoles (/dev/vt/#). The second field specifies the permissions to which
the devices in the device_list field (third field) are set. These permissions must be expressed in octal format, for example, 0774. A
device_list is a colon-separated list of device names. A device name must be a /dev link.
A directory or logical name in the device name can be either one of the following:
o A fully qualified name, for example, fbs.
o A regular expression, for example, [a-z0-9.]+. See regexp(5) for more information on regular expressions.
o The wildcard character * specifying all directory or node names (except . and .., for example, /dev/fbs/* specifies all frame
buffer devices.
Some examples of /etc/logindevperm file entries include:
/dev/usb/[0-9a-f]+[.][0-9a-f]+/[0-9]+/[a-z0-9.]+
/dev/usb/[0-9a-f]+[.][0-9a-f]+/[0-9]+/*
/dev/usb/[0-9a-f]+[.][0-9a-f]+/*/*
Specify all ugen(7D) endpoints and status nodes.
Drivers can also be specified to limit the permission changes to minor nodes owned by the specified drivers. For example,
/dev/console 0600 /dev/usb/[0-9a-f]+[.][0-9a-f]+/[0-9]+/*
driver=usb_mid,scsa2usb,usbprn # libusb devices
Due to the persistence of devfs(7FS) minor node management, the user should be logged in as root if the list of minor nodes will be reduced
and the devices should all be plugged in.
Once the devices are owned by the user, their permissions and ownership can be changed using chmod(1) and chown(1), as with any other user-
owned file.
Upon logout the owner and group of these devices are reset by ttymon(1M) to owner root and root's group as specified in /etc/passwd (typi-
cally other). The permissions are set as specified in the /etc/logindevperm file.
FILES
/etc/passwd File that contains user group information.
SEE ALSO chmod(1), chown(1), login(1), ttymon(1M), passwd(4), regexp(5), ugen(7D)NOTES
/etc/logindevperm provides a superset of the functionality provided by /etc/fbtab in SunOS 4.x releases.
SunOS 5.11 25 Sep 2008 logindevperm(4)