08-17-2010
Quote:
I made a mistake and on one of the servers changed with chmod the permission of root in directory /.
Were you logged in as "root"?
What directory were you in at the time?
What did you type?
This User Gave Thanks to methyl For This Post:
10 More Discussions You Might Find Interesting
1. Solaris
Hi,
I have a folder with diff subfolders in my Unix box and now I want to ftp all the floders into my Windows machine. Is there any easy way to do that. When I use the "mget " cmd and try to FTP the files, it throws an error that the sub folder name does not exist.
Can you someone help in... (3 Replies)
Discussion started by: chandu_kalari
3 Replies
2. Shell Programming and Scripting
Helpppppppppppppp
Hi..
I have 2 servers with linux suse10.
I made a mistake and on one of the servers changed with chmod the permission of root in directory /.
In the other servers the permissions are correct
Please i need a script, to change the permissions of one server 1, using... (1 Reply)
Discussion started by: ave-phoenix
1 Replies
3. Windows & DOS: Issues & Discussions
I have files existing with same names in the folders with date as display below
c:\2010-09-10 <==== folder
arr1.jpg
arr2.jpg
arr3.jpg
arr4.jpg
c:\2010-09-09 <==== folder
arr1.jpg
arr2.jpg
c:\2010-09-08 <==== folder
arr2.jpg
arr3.jpg
arr4.jpg
... (5 Replies)
Discussion started by: jville
5 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I just started to learn shell progamming and just can't get my head around the following problem.
I need to do the following:
I have a folder which contains 100+ subfolders. Inside these subfolders there is one folder named 'Morph' and several jpg's.
I need to copy all the files into... (4 Replies)
Discussion started by: M474746
4 Replies
5. Shell Programming and Scripting
Folks,
I am hopeful that you may be able to help me out with writing a script that can be run nightly (as cron?) to loop through all subfolders within the "/media" directory, delete all of the files in each of them, and then copy in all of the files from the "/home//sansa" directory to each of... (6 Replies)
Discussion started by: acraig
6 Replies
6. Shell Programming and Scripting
Hi,
I need help in shell scripting. If someone can help me, that would be great!
Problem. I want Linux Script to compare two folders and copy missing files.
Description.
I have two directories
/dir1
/dir2
I need to copy all distinct/new/unique/missing files from /dir1 and that... (1 Reply)
Discussion started by: S.Praveen Kumar
1 Replies
7. HP-UX
Dear All,
I will appreciate any help received. Our system is running on hpux v1
My problem is as follows:
We have many customer folders with name fd000100, fd000101 and so on
e.g.
(Testrun)(testsqa):/>ll /TESTrun/fd000100
total 48
drwxrwx--- 2 fq000100 test 96 Jun 27 2004... (17 Replies)
Discussion started by: mhbd
17 Replies
8. Shell Programming and Scripting
How do you compare one local folder and a remote folder and copy the difference to a third folder in a remote folder.e.g.
Folder A -- Is in a remote server and it has the following files
TEST1.OUT
TEST2.OUT
TEST3.OUT
Folder B --Is in a local server and it has the following files
... (5 Replies)
Discussion started by: cumeh1624
5 Replies
9. Shell Programming and Scripting
Hi,
So i know we use cp -r as a basic to copy folders/files.
I would like this BUT i would like to show the output of the files being copied.
With the amazing knowledge i have i have gone as far as this:
1) find source/* -exec cp -r {} target/ \;
2) for ObjectToBeCopied in `find... (6 Replies)
Discussion started by: Imre
6 Replies
10. UNIX for Beginners Questions & Answers
Hi there!
I'm new to Unix and haven't done command line stuff since MS-Dos and Turbo Pascal (hah!),
I would love some help figuring out this basic command (what I assume is basic).
I'd like to add a User to the permissions of all files in a folder and all files in all subfolders, as well... (9 Replies)
Discussion started by: Janjbrt
9 Replies
LEARN ABOUT SUNOS
fchroot
chroot(2) System Calls chroot(2)
NAME
chroot, fchroot - change root directory
SYNOPSIS
#include <unistd.h>
int chroot(const char *path);
int fchroot(int fildes);
DESCRIPTION
The chroot() and fchroot() functions cause a directory to become the root directory, the starting point for path searches for path names
beginning with / (slash). The user's working directory is unaffected by the chroot() and fchroot() functions.
The path argument points to a path name naming a directory. The fildes argument to fchroot() is the open file descriptor of the directory
which is to become the root.
The privilege {PRIV_PROC_CHROOT} must be asserted in the effective set of the process to change the root directory. While it is always pos-
sible to change to the system root using the fchroot() function, it is not guaranteed to succeed in any other case, even if fildes is valid
in all respects.
The ".." entry in the root directory is interpreted to mean the root directory itself. Therefore, ".." cannot be used to access files out-
side the subtree rooted at the root directory. Instead, fchroot() can be used to reset the root to a directory that was opened before the
root directory was changed.
RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned, the root directory remains unchanged, and errno is set to indicate
the error.
ERRORS
The chroot() function will fail if:
EACCES Search permission is denied for a component of the path prefix of dirname, or search permission is denied for the
directory referred to by dirname.
EBADF The descriptor is not valid.
EFAULT The path argument points to an illegal address.
EINVAL The fchroot() function attempted to change to a directory the is not the system root and external circumstances do
not allow this.
EINTR A signal was caught during the execution of the chroot() function.
EIO An I/O error occurred while reading from or writing to the file system.
ELOOP Too many symbolic links were encountered in translating path.
ENAMETOOLONG The length of the path argument exceeds PATH_MAX, or the length of a path component exceeds NAME_MAX while
_POSIX_NO_TRUNC is in effect.
ENOENT The named directory does not exist or is a null pathname.
ENOLINK The path argument points to a remote machine and the link to that machine is no longer active.
ENOTDIR Any component of the path name is not a directory.
EPERM The {PRIV_PROC_CHROOT} privilege is not asserted in the effective set of the calling process.
SEE ALSO
chroot(1M), chdir(2), privileges(5)
WARNINGS
The only use of fchroot() that is appropriate is to change back to the system root.
SunOS 5.10 20 Jan 2003 chroot(2)