Log file permissions in Oracle WebLogic - linux

I have changed the startWeblogic.sh script to give read access to the log files.
Here are examples:
-rw-r--r--. 1 oracle oinstall 81586 Apr 15 22:43 access.log
-rw-r--r--. 1 oracle oinstall 700087 Apr 15 22:45 localhost.log
-rw-r-----. 1 oracle oinstall 20553 Apr 15 22:49 localhost.out
From the above other users got read permissions for access.log and localhost.log, but its not assigning read access to localhost.out log file. Please suggest which configuration file to change.

set umask 022 in startweblogic.sh and startnodemanager.sh and wlscontrol.sh worked

Related

Installation Of Cassandra

I have download cassandra via terminal but problem is where are the other folders like data, conf, lib, doc etc.
i can see only some files as shown in figure i.e Click here
where is the other folders ?
By "download cassandra via terminal" and your screenshot, I'll assume that you installed Cassandra via apt-get.
From the Apache Cassandra project Wiki, section on Installation from Debian packages:
The default location of configuration files is /etc/cassandra.
The default location of log and data directories is /var/log/cassandra/ and /var/lib/cassandra.
As for the lib directory, check how your $CASSANDRA_HOME is being set:
$ grep CASSANDRA_HOME /etc/init.d/cassandra
CASSANDRA_HOME=/usr/share/cassandra
$ ls -al /usr/share/cassandra/
total 8312
drwxr-xr-x 3 root root 4096 Dec 13 07:57 .
drwxr-xr-x 372 root root 12288 Nov 28 08:51 ..
-rw-r--r-- 1 root root 5962385 Jun 1 2016 apache-cassandra-3.6.jar
lrwxrwxrwx 1 root root 24 Jun 1 2016 apache-cassandra.jar -> apache-cassandra-3.6.jar
-rw-r--r-- 1 root root 1902216 Jun 1 2016 apache-cassandra-thrift-3.6.jar
-rw-r--r-- 1 root root 875 May 31 2016 cassandra.in.sh
drwxr-xr-x 3 root root 12288 Dec 13 07:57 lib
-rw-r----- 1 root root 82123 Oct 20 2015 metrics-core-2.2.0.jar
-rw-r----- 1 root root 9639 Oct 20 2015 metrics-graphite-2.2.0.jar
-rw-r--r-- 1 root root 509144 Jun 1 2016 stress.jar
Note that Cassandra's lib directory is shown in the middle of the directory listing above.

Apache Ant BINARY download is missing a BINARY file?

Failing to simply copy a binary to linux machine. Wow! I feel stupid today! Below is the list of files in the binary package's tar.gz, as downloaded from default mirror and utah.edu:
-rwxr-xr-x 1 ec2-user ec2-user 10321 Apr 9 2016 ant
-rw-r--r-- 1 ec2-user ec2-user 7472 Apr 9 2016 ant.bat
-rw-r--r-- 1 ec2-user ec2-user 2857 Apr 9 2016 ant.cmd
-rw-r--r-- 1 ec2-user ec2-user 3410 Apr 9 2016 antenv.cmd
-rwxr-xr-x 1 ec2-user ec2-user 861 Apr 9 2016 antRun
-rw-r--r-- 1 ec2-user ec2-user 1536 Apr 9 2016 antRun.bat
-rwxr-xr-x 1 ec2-user ec2-user 2116 Apr 9 2016 antRun.pl
-rwxr-xr-x 1 ec2-user ec2-user 3473 Apr 9 2016 complete-ant-cmd.pl
-rw-r--r-- 1 ec2-user ec2-user 4315 Apr 9 2016 envset.cmd
-rw-r--r-- 1 ec2-user ec2-user 1116 Apr 9 2016 lcp.bat
-rwxr-xr-x 1 ec2-user ec2-user 4333 Apr 9 2016 runant.pl
-rwxr-xr-x 1 ec2-user ec2-user 3385 Apr 9 2016 runant.py
-rw-r--r-- 1 ec2-user ec2-user 1817 Apr 9 2016 runrc.cmd
Am I missing something? All I see is a DIRECTORY named "ant". Obviously this won't run as expected by supremely simple "INSTALL" instructions (primarily written for benefit of Windows users, summarized):
"-Add the bin directory to your path.
-Set the ANT_HOME environment variable
-You can check the basic installation with opening a new shell and typing ant."
If I need to run one of these files to "Install" the binary maybe the instructions could mention it. As it is this looks to me like (again) like developers high on 'dozes forgetting about the other OS.
I see a shell script called ant not a directory. OK, less flippant. The binary distribution contains a the shell script and a bunch of binary jars. You actually do add the bin folder to your PATH and runant. "install" means, extract the tarball wherever you want and set up the environment.
– Stefan Bodewig

Touch command. permission denied

I was able to connect to my school server via SSH. I had an assignment in which I was supposed to use the touch command to create a new file. Yet it keeps returning permission denied. Others were able to do the same thing. Though why do I keep getting this error?
Below is what was the input from the terminal.
Last login: Tue Aug 23 09:16:18 on ttys000
Dominiks-Air:~ fsociety95$ ssh djaneka1#navajo.dtcc.edu
djaneka1#navajo.dtcc.edu's password:
Last login: Tue Aug 23 09:16:35 2016 from pool-72-94-210-193.phlapa.fios.verizon.net
Navajo is Linux shell server provided to staff, faculty, and students. The
operating system is RedHat Enterprise Linux 5.
Alpine, a Pine replacement, has been provided as a mail client. Run "pine"
at the command prompt.
This server also provides web space to users. Web pages can be stored in
the ~/www directory. This is also accessible by mapping a drive in Windows
to \navajo\homepage. The URL for your homepage is
http://user.dtcc.edu/~username/.
Your home directory is also accessible in Windows by mapping to
\navajo\.
If something appears broken or missing, please email path#dtcc.edu.
Could not chdir to home directory /u/d/j/djaneka1: No such file or directory
-bash-3.2$ touch today
touch: cannot touch `today': Permission denied
-bash-3.2$ pwd
/
-bash-3.2$ touch today
touch: cannot touch `today': Permission denied
-bash-3.2$
Edit: here is the result of ls -al
-bash-3.2$ ls -al
total 204
drwxr-xr-x 25 root root 4096 Aug 22 16:50 .
drwxr-xr-x 25 root root 4096 Aug 22 16:50 ..
-rw-r--r-- 1 root root 0 Aug 3 14:01 .autofsck
-rw-r--r-- 1 root root 0 Jan 30 2009 .autorelabel
-rw------- 1 root root 2050 Aug 3 14:00 .bash_history
drwxr-xr-x 2 root root 4096 May 4 04:14 bin
drwxr-xr-x 4 root root 3072 Aug 3 13:57 boot
drwxr-xr-x 11 root root 4060 Aug 3 14:02 dev
drwxr-xr-x 87 root root 12288 Aug 23 10:05 etc
drwxr-xr-x 3 root root 4096 Oct 1 2009 home
drwxr-xr-x 13 root root 12288 Jun 1 04:09 lib
drwx------ 2 root root 16384 Mar 24 2008 lost+found
drwxr-xr-x 3 root root 4096 Oct 1 2009 media
drwxr-xr-x 2 root root 0 Aug 3 14:02 misc
drwxr-xr-x 4 root root 4096 May 26 2012 mnt
drwxr-xr-x 2 root root 0 Aug 3 14:02 net
drwxr-xr-x 9 root root 4096 Jan 5 2009 nsr
drwxrwxr-x 3 root root 4096 Oct 12 2015 opt
dr-xr-xr-x 219 root root 0 Aug 3 14:01 proc
drwxr-x--- 12 root root 4096 Apr 22 10:06 root
drwxr-xr-x 2 root root 12288 Aug 4 04:02 sbin
drwxr-xr-x 2 root root 4096 Oct 1 2009 selinux
drwxr-xr-x 2 root root 4096 Oct 1 2009 srv
drwxr-xr-x 11 root root 0 Aug 3 14:01 sys
drwxrwxrwt 38 root root 4096 Aug 23 10:07 tmp
drwxr-xr-x 34 root root 4096 Jun 21 08:29 u
drwxr-xr-x 14 root root 4096 Apr 16 2010 usr
drwxr-xr-x 24 root root 4096 Apr 16 2010 var
-rw------- 1 root root 2865 Dec 16 2008 .viminfo
-bash-3.2$
EDIT:
Here is what I see after trying touch today in /home
So to try and create a new document in the root directory you need to be recognised as root. That means using the sudo command.
However for that you would need a password that you may not have. If you do perfect. But in any case I would not recommend adding files to the root directory.
Instead try the following:
cd home
touch today
This should work just fine and answer your question.
Still if you need/want to create today in your root directory try the following
sudo touch today
You will then be prompted for the root password that you can type (if you have it obviously)
In any case I suggest reading this which may be very helpful for you.
I wonder if this was ever truly answered.
If I was looking at it, I would try to see what the system thinks is the home directory of djaneka1, since it may have been setup partway and not completed, leaving stuff owned by root that should have been owned by djaneka1.
If you use the pwd command, and get back the "/" (root) directory there is something wrong with your setup.
The message: Could not chdir to home directory /u/d/j/djaneka1: No such file or directory
tells you it can't find your home directory.
-bash-3.2$ pwd
/
the command "pwd" revealing "/" is just an artifact of the system not being able to find your home directory.
To find what the system thinks is one's home directory,
one can search the file named '/etc/passwd' for one's login name.
I expect this is a possible result if you do that:
$ fgrep 'djaneka1' /etc/passwd
djaneka1:x:1505:1506::/u/d/j/djaneka1:/bin/bash
since it complained that it couldn't find that directory.
This needs to be fixed by someone who has more rights to the system, like root.
there is nothing djaneka1 can do a

SVN: Force svn daemon to run under different user

I have a small NAS server (QNAP TS-210) with a limited Linux on-board. I have problems running hooks in my local SVN daemon. If I run them directly, from command-line, all is OK. If SVN try to run them as hook or if they're added to crontab and then CRON tries to run them, both fails.
I was told that this is due to difference between users running these scripts / hooks. I'm logging to my nas via SSH as "admin" and assume that both CRON and SVN are run under "root". Seems that root hasn't got enough privileges for destination folder (I use SVN post-commit-hook to export repository to some local folder) or to run SVN / CRON (SVN also fails on pre-revprop-change hook, even if it contains only exit 0, so I assume that SVN can't run hooks at all). Or maybe this is something different?
EDIT: How can force SVN to run under "admin" or how can I set enough privileges for "root", so it can run SVN hooks just as I can ("admin")?
EDIT: My hook script is in /share/Sys/svn/tools_and_examples/hooks so, calling
ls -lh /share/Sys/svn/tools_and_examples/hooks
results this:
-rwxrwx--x 1 trejder everyone 147 Jun 24 14:33 post-commit.cron*
-rw-rw---- 1 admin administ 1.9k Jun 25 12:20 post-commit.tmpl
-rw-rw---- 1 admin administ 1.6k Jun 25 12:20 post-lock.tmpl
-rw-rw---- 1 admin administ 2.2k Jun 25 12:20 post-revprop-change.tmpl
-rw-rw---- 1 admin administ 1.5k Jun 25 12:20 post-unlock.tmpl
-rw-rw---- 1 admin administ 3.3k Jun 25 12:20 pre-commit.tmpl
-rw-rw---- 1 admin administ 2.4k Jun 25 12:20 pre-lock.tmpl
-rw-rw---- 1 admin administ 6 Jun 25 12:29 pre-revprop-change
-rw-rw---- 1 admin administ 2.1k Jun 25 12:20 pre-unlock.tmpl
-rw-rw---- 1 admin administ 2.7k Jun 25 12:20 start-commit.tmpl
and ls -lh /share/Sys/svn/tools_and_examples/hooks/post-commit.cron gaves me this:
-rwxrwx--x 1 trejder everyone 147 Jun 24 14:33 /share/Sys/svn/tools_and_examples/hooks/post-commit.cron*
Hope, this will help.
for a cron being launched as admin, instead of editing
/etc/crontab
you should use
crontab -e
logged in as admin and put whatever command/script you want to be launched by admin with its own crontab. If I'm not wrong, it should launch it as the "admin" user

linux permission group

I am trying to setup my webserver so that one group will have access to the files. Apache and every user that needs to edit the files will be part of this group. So I've set all the files to have the group psacln. I've added psacln to my groups. But it still won't let me view the files:
[tom#166 httpdocs]$ whoami
tom
[tom#166 httpdocs]$ groups tom
tom : tom adm wheel apache psacln andy
[tom#166 httpdocs]$ ls -al
ls: .: Permission denied
[tom#166 httpdocs]$ sudo ls -al
total 92
d---rwx--- 14 andy psacln 4096 Jul 22 17:51 .
drwxrwxr-x 16 apache apache 4096 Jul 21 09:29 ..
d---rwx--- 4 andy psacln 4096 Jul 21 09:26 backend
d---rwx--- 3 andy psacln 4096 Jul 22 15:21 core
d---rwx--- 5 andy psacln 4096 Jul 21 09:26 css
...
One thing that may be useful to note, is that when you change a user's group membership, you will have to log out and back in again (i.e. group memberships will take effect when you log in and don't normally change otherwise).
You can either log in and out to let the group change take effect, or changing your "active" group with the newgrp command will also do this for you.

Resources