i'm trying to set up my internet connection and i was told i need to edit the file
/etc/ppp/pap-secrets
but i get a permission denied message...why?? (6 Replies)
I'll start off by saying that I know very little about Unix - however, I do know that I have a .profile file in my home directory, and that I should be able to invoke it by typing . profile. However, when I do this for ANY .filename, I get ".: Permission denied". I'm pretty sure that there is... (12 Replies)
Hi Gurus,
I am new to scripting and needs your help in expect script used for telnet. I wrote a simple script as
#!/usr/bin/expect-5.43 -f
spawn telnet localhost 2233
expect "password:"
send "secret\r"
send "i data.cnbc.com\r"
send "exit\r"
expect eof
When I am trying to execute... (2 Replies)
Hi guys.
i have wrote a simple program to test message queue attributes. here it is:
#include <stdio.h>
#include <stdlib.h>
#include <mqueue.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <sys/stat.h>
int main()
{
struct mq_attr attr;
mqd_t mqd;
... (2 Replies)
Hi,
I am trying to run a shell script which contains an mkdir command as part of the execution. The script fails with the following error:
mkdir: cannot create directory `/builds/somedir/': Permission denied
The user running the script is 'harry' and belongs to group 'school'.... (5 Replies)
Hi there,
I want to restrict a users account to only a subdirectory, but it does not seem to be working.
For example
/dir1/dir2/dir3/dir4
user A is only allowed to do things in dir4. the permission is 777.
i've set the permissions to 700 on dir3, dir2, and dir1 to prevent them from... (3 Replies)
I want to use msgget() to obtain a message queue between two processes, here is my code:
the first one create the mq, the second one open it and add a message to it. But when I execute the second one, I get permission denied. I've already desperately tried everything I can think of to solve this... (2 Replies)
for incompatibility installation problems, I've decided to reinstall Centos 6.3
as can be seem from the df output, I've partitioned both / and and /home directories
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda8 12G 5.3G 6.5G 45% /
tmpfs ... (2 Replies)
Asking about the permission inherit from the parent directory
I am running the web app with tomcat8, I did use umask 007 to set permission for folder which enable the sub files and folder inherit the permission from the parent directory, I was successful which some directories but the directories... (1 Reply)
Asking about the permission inherit from the parent directory
I am running the web app with tomcat8, I did use umask 007 to set permission for folder which enable the sub files and folder inherit the permission from the parent directory, I was successful which some directories but the directories... (2 Replies)
Discussion started by: janecaongoc
2 Replies
LEARN ABOUT OPENDARWIN
chroot
CHROOT(2) BSD System Calls Manual CHROOT(2)NAME
chroot -- change root directory
SYNOPSIS
#include <unistd.h>
int
chroot(const char *dirname);
DESCRIPTION
Dirname is the address of the pathname of a directory, terminated by an ASCII NUL. Chroot() causes dirname to become the root directory,
that is, the starting point for path searches of pathnames beginning with '/'.
In order for a directory to become the root directory a process must have execute (search) access for that directory.
If the program is not currently running with an altered root directory, it should be noted that chroot() has no effect on the process's cur-
rent directory.
If the program is already running with an altered root directory, the process's current directory is changed to the same new root directory.
This prevents the current directory from being further up the directory tree than the altered root directory.
This call is restricted to the super-user.
RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate an error.
ERRORS
Chroot() will fail and the root directory will be unchanged if:
[ENOTDIR] A component of the path name is not a directory.
[ENAMETOOLONG] A component of a pathname exceeded {NAME_MAX} characters, or an entire path name exceeded {PATH_MAX} characters.
[ENOENT] The named directory does not exist.
[EACCES] Search permission is denied for any component of the path name.
[ELOOP] Too many symbolic links were encountered in translating the pathname.
[EFAULT] Path points outside the process's allocated address space.
[EIO] An I/O error occurred while reading from or writing to the file system.
SEE ALSO chdir(2)WARNINGS
There are ways for a root process to escape from the chroot jail.
HISTORY
The chroot() function call appeared in 4.2BSD.
4.2 Berkeley Distribution June 4, 1993 4.2 Berkeley Distribution