Permissions issue


 
Thread Tools Search this Thread
Operating Systems Solaris Permissions issue
# 1  
Old 03-07-2013
Permissions issue

Hello,
I'm having an issue with a directory that is used to forward Windows logs. I have a user account on Windows servers that uses SCP to put logs on my Solaris 10 server. A appliance called LogLogic then takes the logs from my server and stores them. I need to have have group read so the LogLogic appliance can pull the logs.

The directory is /loglogic. Then each windows server puts it's logs into a directory with the same name as it has.
Example:
Code:
cd /loglogic
ls -l
drwxr-x--- 1 winaccout loglogic 6 Mar 7  10:56 wina
drwxr-x--- 4 winaccout loglogic 6 Mar 7  10:56 winb
drwxr-x--- 2 winaccout loglogic 6 Mar 7  10:56 winc

I have tried to use umask to set the permissions but it is not working. I have also add a umask statement in the .profile file.
Code:
umask 
0037
touch ju;ls -l ju
-rw-r----- 1 winaccout loglogic 0 Mar 7  10:56 ju

I was expecting 740. I also tried umask u=rwx,g=r,o= and this didn't work ether.
I have also tested with scp.
Code:
scp  file  winaccount@solaris:/loglogic:/loglogic/wina/
ls -l /loglogic:/loglogic/wina/file
-rw------  1 winaccout loglogic 6 Mar 7  10:56 file

It looks like there is a setting for ssh I also need to worry about.

Can you give me a hand?
# 2  
Old 03-07-2013
Anything that's not an actual shell login does not use the shell script ~/.profile.

sshd does have its own additional file, ~/.ssh/environment, in which you can put umask=022 or what have you. You must have
Code:
PermitUserEnvironment yes

in your sshd_config for it to use this file.
# 3  
Old 03-07-2013
The user has nothing in the .ssh directory but the authorized_keys2 file.

you want me to add the
PermitUserEnvironment yesto /etc/ssh/sshd_config ?

I add the line to that file and it still only comes over as -rw-------
# 4  
Old 03-07-2013
Yes, though there may be a PermitUserEnvironment no in there already.

Then restart or reload sshd so the new settings take effect.

ssh should thereafter attempt to load the optional ~/.ssh/environment file when users scp, which would allow you to specify umask=022 in their ~/.ssh/environment file.
# 5  
Old 03-07-2013
there was not any
PermitUserEnvironment
I have restarted the ssh
I will create ~/.ssh/environment

---------- Post updated at 12:54 PM ---------- Previous update was at 12:37 PM ----------

Ok
I have add "PermitUserEnvironment yes" to /etc/ssh/sshd_config

I have add umask=022 to
~/.ssh/environment

I then restarted ssh on the zone.

Thanks for your help so far.
# 6  
Old 03-07-2013
Does the problem persist?
# 7  
Old 03-08-2013
Yes I even got my 2 co-works looking at it as well and we don't seem to be making any headway.

---------- Post updated 03-08-13 at 08:52 AM ---------- Previous update was 03-07-13 at 01:33 PM ----------

Update,
I was not able to get the umask to work for me so I wrote a script and added it to the crontab.
Here it is :
Code:
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38 * * * * chmod -R 750 /loglogic/ > /dev/null 2>&1
40,42,44,46,48,50,52,54,56,58 * * * * chmod -R 750 /loglogic/ > /dev/null 2>&1

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Permissions issue

Hi, I have a shell script which calls oracle procedure. Procedure creates a file using oracle utl_file and places file on unix server at loaction /tmp. The file permission is getting set to 640 (Owner=oracle, group=dba) I need it to be 644 by default. (So others can read it.) The umask... (4 Replies)
Discussion started by: krishna_gnv
4 Replies

2. Shell Programming and Scripting

Permissions Issue

Hi Experts, I have one ftp user which will FTP the files to two subdirectories of some other user. Say i have one user "xyz" . It FTP's the file to the directory of "abc" user. I have added xyz user in abc group. -rw-r--r-- 1 xyz abc 0 Jul 26 10:05 mo -rw-r--r-- 1 xyz abc ... (1 Reply)
Discussion started by: sugarcane
1 Replies

3. UNIX for Dummies Questions & Answers

Permissions issue with webserver and svn

Update: Please anybody can give some help ? I've an issue with files ownerships. I have a drupal website and the "files" folder needs to be owned by "www-data" in order to let the users to upload files with php. However I'm now using svn and I need all folders and files to be owned by my... (1 Reply)
Discussion started by: aneuryzma
1 Replies

4. Shell Programming and Scripting

Crontab Permissions Issue with Python

I have a cron on a Linux server that isn't executing properly. CRON (with specific info replaced): MAILTO=emailaddress@server.com */2 * * * * python /data/site/cron.py OUTPUT: python: can't open file '/data/site/cron.py ': No such file or directoryAdditional info - The python path is... (3 Replies)
Discussion started by: theHire
3 Replies

5. HP-UX

[Solved] File permissions issue

Hi everybody, following is the scenario; OS HP UX 11.23 two users: # id bodi uid=109(bodi) gid=20(users) groups=1(other),2(bin),3(sys),106(oinstall) # id ossmed uid=121(ossmed) gid=20(users) umask 077 directory name /home/mydir directory permissions drwxrwxrwx requirement: to... (3 Replies)
Discussion started by: ajays
3 Replies

6. UNIX for Dummies Questions & Answers

Permissions issue after copying files

Hi everyone, I am using mac os x 10.6, and I just copied over a project from a machine with 10.5... And I noticed my ls color is very funky in this directory... I found that my permissions are all messed up, and am wondering if there is a way to recursively fix permissions? This is how they... (3 Replies)
Discussion started by: patrick99e99
3 Replies

7. UNIX for Advanced & Expert Users

Issue with File Permissions

one of the business users is ftping files into unix box using user name ftp_user, where as i am using infa_user to login into same unix box. When i am trying to access those or copy over those files from upload directory it says permission denied. Though i know the password of... (4 Replies)
Discussion started by: Ariean
4 Replies

8. Solaris

Issue With File Permissions while uploading

one of the business users is ftping files into unix box using user name ftp_user, where as i am using infa_user to login into same unix box. When i am trying to access those or copy over those files from upload directory it says permission denied. Though i know the password of ftp_user to... (4 Replies)
Discussion started by: Ariean
4 Replies

9. Linux

permissions issue

We are trying to run a program on a Red Hat ES3 machine that works fine under root user but not as any other user. I believe its getting denied access to the USB ports (which this program needs), Does anyone know how i can open up access to the USB ports on a machine to all users. Thanks, Frank (0 Replies)
Discussion started by: frankkahle
0 Replies

10. HP-UX

File permissions issue

Hi, We have a apps database running on HP-UX 11.11. Yesterday, we had a problem with the server which was resolved after rebooting the server. Now the problem I am facing is that now the files created by application manager user has weird file permissions. Like instead of rw-r-r it is... (1 Reply)
Discussion started by: isingh786
1 Replies
Login or Register to Ask a Question