I'm changing (trying to anyway) a script that will need to unrar a file, this file will create a directory with files in it. Then I need to change the owner ship and permission on that directory. Finally, I will rsync the directory to another machine.
Hello there!
You say unrar but use tar?
Not that I know how You use this script but maybe You could consider passing the filename as a parameter? Unless You are doing some looping here...
What are You missing? Setting mode on the unpacked files? Do You know what settings You want? Do You know where You have unpacked the files?
If, as an example, You have unpacked them in Your current, previously empty, working directory then I guess
hello
chown not change ownership
before:
205:system ~kuku
chown kuku:system ~kuku
after no change
205:system ~kuku
aix box
can someone help me?
ariec (2 Replies)
I have a strange problem in my Linux box (Suse). Recently I took over this box as admin even though I have no prior admin experience. Following is my issue
I had following users under 'root' group initially
user1
user2
user3
Since I did not like user ids under root group. I modifed these... (9 Replies)
hello
i want shell script.
i have a source.txt
/home/user409/public_html/test/
/home/user09876/public_html/xdsss/
/home/user9765/public_html/320xxx/
.
.
.
maybe 1000 lines
i want .
1.read a source.txt
2.untar special.tar.gz into these directory in source.txt
3.i want to... (14 Replies)
I have a file fin2009_4.txt.gz in the unix ftp server. Owner of the file is: ftpusr.
-rw-r--r-- 1 ftpusr sap 0 Feb 19 10:19 fin2009_4.txt.gz
When I try to delete this file after copying to my home folder, I am getting the following error.
rm: fin2009_4.txt.gz1: override... (4 Replies)
Hello
My oracledatabase creats some xmlfiles. this files has the owner hugo. now I've a script (how runs als hugo2) and this script will insert this XMLFile into the database. But that doesn't work, because the owner of the files is wrong, and hugo has not the rights to insert this files into... (3 Replies)
does anyone know how to exclude a directory with chown or chmod?
im trying to do something like this
chown $username:$username $directory/*
chown $username:$username $directory/.*
chown $username:$username $directory
and
find $directory/* -type f -exec... (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)
Hi All,
Seeking for your assistance on how to log that has been chmod,mv,chown,chgrp and how to prevent script running while chmod,mv,chown,chgrp are still running?
Ex: a/b/c-folder
file1.txt
file2.txt
file3.txt
chmod 777 *
chown owner
owner group
mv
what i did was(please see... (6 Replies)
Discussion started by: nikki1200
6 Replies
LEARN ABOUT OSF1
chown
chown(1) General Commands Manual chown(1)NAME
chown - Changes the owner of files or directories
SYNOPSIS
chown [-fhR] owner [:group] file...
The chown command changes the owner of the specified files or directories to the specified user name or user ID.
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
chown: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
[Tru64 UNIX] Turns off error reporting. [Tru64 UNIX] If file is a symbolic link, chown -h file changes the owner of the symbolic link.
The chown file format changes the owner of the file referenced by the symbolic link. Descends recursively through its directory arguments,
setting the specified owner.
OPERANDS
The pathname of the file for which ownership is to be changed. A user ID and optional group ID to be assigned to file. The owner portion
of this operand must be a user name from the user database or a numeric user ID. Either specifies a user ID to be given to each file named
by one of the file operands. If a numeric owner operand exists in the user database as a user name, the user ID number associated with that
user name will be used as the user ID.
If the group portion of this operand is present, it must be a group name from the group database or a numeric group ID. Either spec-
ifies a group ID to be given to each file. If a numeric group operand exists in the group database as a group name, the group ID
number associated with that group name will be used as the group ID.
DESCRIPTION
[Tru64 UNIX] Only a user with superuser authority can use the chown command.
The owner argument must be a valid user name or a valid numerical user ID. The optional group argument must be a valid group name or a
valid numerical group ID.
EXIT STATUS
The following exit values are returned: The chown command executed successfully and all requested changes have been made. An error
occurred.
EXAMPLES
To change the owner of the file program.c, enter: chown steffan program.c
The user access permissions for program.c now apply to steffan. As the owner, steffan can use the chmod command to permit or deny the
other users access to program.c. See the chmod command for details.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of chown: Provides a default value for the internationalization variables that are
unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari-
ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value,
overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for-
mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of
LC_MESSAGES.
FILES
Contains user names and numeric user IDs.
SEE ALSO
Commands: chgrp(1), chmod(1), passwd(1)
Functions: chown(2), chmod(2)
Files: passwd(4)
Standards: standards(5)chown(1)