[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ossec-list] ossec-list Digest, Vol 7, Issue 9
- Subject: [Ossec-list] ossec-list Digest, Vol 7, Issue 9
- From: sebastian.benner at FernUni-Hagen.de (Sebastian Benner)
- Date: Wed, 17 May 2006 08:00:32 +0000 (UTC)
Hello Daniel,
that's what I get - seems to be ok:
---------------------------------------------------------
bash-3.00# mkdir -m 700 -p /var/ossec
bash-3.00# ls -alF /var/
total 50
.....
drwx------ 2 root 512 May 17 07:36 ossec/
.....
bash-3.00# mkdir -m 700 -p ./mktest-1
bash-3.00# ls -alF
total 160
drwxr-xr-x 7 1000 1010 May 17 07:36 ./
drwxrwxrwt 3 root 377 May 17 07:36 ../
-rw-r--r-- 1 1000 3132 Feb 8 21:04 BUGS
-rw-r--r-- 1 1000 18638 May 10 01:40 CHANGELOG
-rw-r--r-- 1 1000 365 Apr 12 22:42 CONFIG
-rw-r--r-- 1 1000 1240 May 4 21:29 CONTRIB
-rw-r--r-- 1 1000 1926 Apr 12 22:42 INSTALL
-rw-r--r-- 1 1000 1887 Mar 22 22:01 INSTALL.br
-rw-r--r-- 1 1000 234 May 10 01:40 README
-rw-r--r-- 1 1000 236 Feb 8 16:35 TODO
drwxr-xr-x 3 1000 400 May 10 16:35 active-response/
drwxr-xr-x 3 1000 745 May 10 16:35 doc/
drwxr-xr-x 4 1000 600 May 10 16:35 etc/
-rwxr-xr-x 1 1000 19007 May 10 01:40 install.sh*
drwx------ 2 root 117 May 17 07:36 mktest-1/
drwxr-xr-x 23 1000 1949 May 10 16:35 src/
bash-3.00# /usr/sbin/groupadd ossec
bash-3.00# /usr/sbin/useradd -d /var/ossec -s /bin/false -g ossec ossec
bash-3.00# cat /etc/passwd
.....
ossec:x:101:101::/var/ossec:/bin/false
bash-3.00# cat /etc/group
.....
ossec::101:
bash-3.00# man mkdir
Reformatting page. Please Wait... done
User Commands mkdir(1)
NAME
mkdir - make directories
SYNOPSIS
mkdir [-m mode] [-p] dir...
DESCRIPTION
The mkdir command creates the named directories in mode 777
(possibly altered by the file mode creation mask umask(1)).
Standard entries in a directory (for instance, the files
".", for the directory itself, and "..", for its parent) are
made automatically. mkdir cannot create these entries by
name. Creation of a directory requires write permission in
the parent directory.
The owner-ID and group-ID of the new directories are set to
the process's effective user-ID and group-ID, respectively.
mkdir calls the mkdir(2) system call.
setgid and mkdir
To change the setgid bit on a newly created directory, you
must use chmod g+s or chmod g-s after executing mkdir.
The setgid bit setting is inherited from the parent direc-
tory.
OPTIONS
The following options are supported:
-m mode This option allows users to specify the mode
to be used for new directories. Choices for
modes can be found in chmod(1).
-p With this option, mkdir creates dir by
creating all the non-existing parent direc-
tories first. The mode given to intermediate
directories will be the difference between
777 and the bits set in the file mode crea-
tion mask. The difference, however, must be
at least 300 (write and execute permission
for the user).
OPERANDS
The following operand is supported:
SunOS 5.10 Last change: 1 Feb 1995 1
User Commands mkdir(1)
dir A path name of a directory to be created.
USAGE
See largefile(5) for the description of the behavior of
mkdir when encountering files greater than or equal to 2
Gbyte ( 2**31 bytes).
EXAMPLES
Example 1: Using mkdir
The following example:
example% mkdir -p ltr/jd/jan
creates the subdirectory structure ltr/jd/jan.
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment
variables that affect the execution of mkdir: LANG, LC_ALL,
LC_CTYPE, LC_MESSAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 All the specified directories were created success-
fully or the -p option was specified and all the
specified directories now exist.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | SUNWcsu |
|_____________________________|_____________________________|
| CSI | enabled |
|_____________________________|_____________________________|
| Interface Stability | Standard |
|_____________________________|_____________________________|
SunOS 5.10 Last change: 1 Feb 1995 2
User Commands mkdir(1)
SEE ALSO
rm(1), sh(1), umask(1), intro(2), mkdir(2), attributes(5),
environ(5), largefile(5), standards(5)
SunOS 5.10 Last change: 1 Feb 1995 3
-------------------------------------------------------------------
Regards,
Sebastian
On Tue, 16 May 2006, Daniel Cid wrote:
> Hi Sebastian,
>
> Just complementing what Ahmet was saying, from your
> output it looks like mkdir is not working correctly...
> Can you see if the following commands work:
>
> mkdir -m 700 -p /var/ossec
> mkdir -m 700 -p ./mktest-1
>
> If not, can you show us "mkdir -h (or --help)"
>
> In addtion to that, show us the output of:
>
> /usr/sbin/groupadd ossec
> /usr/sbin/useradd -d /var/ossec -s /bin/false -g ossec ossec
>
> Thanks!
>
> --
> Daniel B. Cid
> dcid @ ( at ) ossec.net
>
>
> On 5/16/06, Sebastian Benner <sebastian.benner at fernuni-hagen.de> wrote:
>>
>>
>> Hello,
>>
>> thank's for the help. I just checked my installation directory:
>>
>> ..............................................................
>> bash-3.00# cd bin
>> bash: cd: bin: Not a directory
>> bash-3.00# more bin
>> ELF?4?4 (?44???,?88?/usr/lib/ld.so.1
>>
>> ?!#$&(),0246789:;<>@BDFIJLMNOQRSTVXZ[\]^_`acefhiklpqrtwxyz{|}
>> bash-3.00#
>> bash-3.00# ls -alF
>> total 200
>> drwxr-xr-x 6 1000 1005 May 15 11:13 ./
>> drwxrwxrwt 3 root 377 May 16 03:30 ../
>> -rw-r--r-- 1 1000 3132 Feb 8 21:04 BUGS
>> -rw-r--r-- 1 1000 18638 May 10 01:40 CHANGELOG
>> -rw-r--r-- 1 1000 365 Apr 12 22:42 CONFIG
>> -rw-r--r-- 1 1000 1240 May 4 21:29 CONTRIB
>> -rw-r--r-- 1 1000 1926 Apr 12 22:42 INSTALL
>> -rw-r--r-- 1 1000 1887 Mar 22 22:01 INSTALL.br
>> -rw-r--r-- 1 1000 234 May 10 01:40 README
>> -rw-r--r-- 1 1000 236 Feb 8 16:35 TODO
>> drwxr-xr-x 3 1000 400 May 10 16:35 active-response/
>> -rwxr-xr-x 1 root 42256 May 16 08:19 bin*
>> drwxr-xr-x 3 1000 745 May 10 16:35 doc/
>> drwxr-xr-x 4 1000 665 May 15 10:42 etc/
>> -rwxr-xr-x 1 1000 19007 May 10 01:40 install.sh*
>> drwxr-xr-x 23 1000 2015 May 15 10:43 src/
>> ..............................................................
>>
>> bin is created, but it's a regular file and not a directory ...
>> I removed bin and followed your hint (creating ./bin by hand). It's still
>> not working ...
>>
>> ------------------------------------------------------------
>> cp -pr ossec-maild ../../bin
>> cp -pr ossec-execd ../../bin
>> cp -pr ossec-analysisd ../../bin
>> cp -pr ossec-logcollector ../../bin
>> cp -pr ossec-remoted ../../bin
>> cp -pr ossec-agentd ../../bin
>> cp -pr manage_agents ../../bin
>> cp -pr manage_agents ../../bin
>> cp -pr syscheck_update clear_stats ../../bin
>> cp -pr ossec-syscheckd ../../bin
>> chmod: WARNING: can't access /var/ossec
>> chown: unknown user id: root:ossec
>> chown: unknown user id: ossec:ossec
>> chmod: WARNING: can't access /var/ossec/queue/alerts
>> chown: unknown user id: ossec:ossec
>> chmod: WARNING: can't access /var/ossec/queue/ossec
>> chown: unknown user id: ossec:ossec
>> chmod: WARNING: can't access /var/ossec/queue/fts
>> chown: unknown user id: ossec:ossec
>> chmod: WARNING: can't access /var/ossec/queue/syscheck
>> chown: unknown user id: ossec:ossec
>> chmod: WARNING: can't access /var/ossec/queue/rootcheck
>> chown: unknown user id: ossecr:ossec
>> chmod: WARNING: can't access /var/ossec/queue/agent-info
>> chown: unknown user id: ossec:ossec
>> chmod: WARNING: can't access /var/ossec/stats
>> chown: unknown user id: ossec:ossec
>> chmod: WARNING: can't access /var/ossec/logs
>> touch: cannot create /var/ossec/logs/ossec.log: No such file or directory
>> chown: unknown user id: ossec:ossec
>> chmod: WARNING: can't access /var/ossec/logs/ossec.log
>> cp: /var/ossec/rules/ not found
>> chown: unknown user id: root:ossec
>> chmod: WARNING: can't access /var/ossec/rules
>> chmod: WARNING: can't access /var/ossec/etc
>> chown: unknown user id: root:ossec
>> Usage: cp [-f] [-i] [-p] [-@] f1 f2
>> cp [-f] [-i] [-p] [-@] f1 ... fn d1
>> cp -r|-R [-H|-L|-P] [-f] [-i] [-p] [-@] d1 ... dn-1 dn
>> chmod: WARNING: can't access /var/ossec/var/run
>> chown: unknown user id: root:ossec
>> cp: /var/ossec/bin/ not found
>> cp: cannot create /var/ossec/bin/: No such file or directory
>> cp: cannot create /var/ossec/bin/: No such file or directory
>> cp: cannot create /var/ossec/bin/: No such file or directory
>> cp: cannot create /var/ossec/bin/ossec-control: No such file or directory
>> cp: cannot create /var/ossec/etc/: No such file or directory
>> cp: /var/ossec/etc/shared/ not found
>> cp: /var/ossec/active-response/bin/ not found
>> chmod: WARNING: can't access /var/ossec/active-response/bin/*
>> Not overwritting /etc/ossec.conf.
>> ------------------------------------------------------------
>>
>> bash-3.00# showrev
>> Hostname: ossec-server
>> Hostid: 83566709
>> Release: 5.10
>> Kernel architecture: sun4u
>> Application architecture: sparc
>> Hardware provider: Sun_Microsystems
>> Domain:
>> Kernel version: SunOS 5.10 Generic_118822-25
>>
>>
>> Regards,
>>
>> Sebastian
>
OSSEC home |
Main Index |
Thread Index
OSSEC project: www.ossec.net.
Mailling list information: http://www.ossec.net/en/mailing_lists.html.