Read-only user in AIX


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Read-only user in AIX
# 1  
Old 09-09-2013
Read-only user in AIX

Hi,
I want to create a new user,and I want to give read permission to a folder which owned by root.
How can I do this?
thanks for your helps
# 2  
Old 09-09-2013
I doubt that you want to give read-only permission for the directory, because this will effectively deny the user any access to it. You rather want to give read-only permission for the files in the directory, yes?

Well, here is what you said you wanted:
Make the group ownership of the directory and the group membership of the user identical (either by making the directory owned by the a group the user is member of or including the user into the group that owns the directory), then set read-only permission for this group:

Code:
chmod g=r o= /path/to/directory

For more information look at the man page of chmod and read the article about UNIX file permissions by Perderabo in the FAQ section.

Alternative possibility, but i advise strongly against using it: implement ACLs.

I hope this helps.

bakunin
# 3  
Old 09-09-2013
thank you for your reply.I want to create a user serdar,
and there is a file on the system which is owned by root ,the file path is /db/oracle/backups.
I want to give read permisson for user serdar to this file.
The user serdar must only have read this file privileges.

---------- Post updated at 04:52 AM ---------- Previous update was at 04:49 AM ----------

what are the commands that I do this operation
# 4  
Old 09-09-2013
First you need to make sure user "serdar" has read- and execute-rights for the directory the file is in.

Then you have to do as i already suggested for the directory, but with the file: either you make it readable by everyone (that would include your user in question), or you make the group set of the user include the group which owns the file (i suppose you do not want to give the file ownership away from root, otherwise you could have the file directly be owned by the user).

I suggest you really read the mentioned tutorial by perderabo.

Quote:
what are the commands that I do this operation
We gladly help you to help yourself, but we do not do your work for you. Go, figure it out yourself!

I hope this helps.

bakunin
# 5  
Old 09-09-2013
I create user using this commands;
Code:
useradd -m serdar
passwd serdar
useradd -G serdargroup -m serdar

now how I can give only read permission /db/backup file?

Moderator's Comments:
Mod Comment edit by bakunin: please use CODE-tags when posing code or commands. Thanks.
As this is a very basic question i transfer the thread over to "Unix for Dummies".

Last edited by bakunin; 09-09-2013 at 11:11 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Unable to set ACLs on sulog - need to grant read permission to a normal user on AIX 6.1

Hi, I need to grant read permission to a normal user on sulog file on AIX 6.1. As root I did acledit sulog and aclget shows "extended permissions" as "enabled" and normal user "splunk" has read permissions. When I try to access sulog as splunk user it won't allow and aclget for splunk user... (6 Replies)
Discussion started by: prvnrk
6 Replies

2. AIX

Assign read write permission to the user for specific dir and it's sub dir and files in AIX

I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. I do not want to assign user the same group of that directories too.... (0 Replies)
Discussion started by: blinkingdan
0 Replies

3. UNIX for Advanced & Expert Users

Read mail attachments in AIX

Hello All, Is there a way to read/view email attachments in AIX? Here's my scenario; I have users that will being scanning documents for digital storage. To make it easier for the users, I would like for them to scan and email the pdf version of the document directly to one of my AIX... (3 Replies)
Discussion started by: bbbngowc
3 Replies

4. UNIX for Dummies Questions & Answers

Read Only user in Vsftpd

HI I have set up vsftp on my Red hat server. Chroot has been set up to control access to each user and folder directories. This all works fine. But i have one directory where i want to chroot but ensure that the ftp access is read only. Any help appreciated thanks Treds (1 Reply)
Discussion started by: treds
1 Replies

5. UNIX Desktop Questions & Answers

AIX how to read the file in function again and again

dear friends I have a wrote a shell script which works like this. 1.) a command is executed and the log is moved in the file. 2.) this file is copied in to the other file. 3.) used a grep command to find a particular word. 4.) if a particular word is there then the script will go to next... (4 Replies)
Discussion started by: aboy212u
4 Replies

6. AIX

AIX - read only FTP

Hi, I want to set FTP server on AIX to read only mode. I found out manual page for /etc/ftpaccess.ctl (manual page ). I tried put readonly: ALL or readonly: ALL writeonly: NONE and nothing happened (of course, I restart FTP server by stopsrc -t ftp; startsrc -t ftp) (2 Replies)
Discussion started by: henriette
2 Replies

7. Shell Programming and Scripting

Help with Bash piped while-read and a read user input at the same time

Hi I am new to writing script and want to use a Bash Piped while-read and read from user input. if something happens on server.log then do while loop or if something happend on user input then do while loop. Pseudocode something like: tail -n 3 -f server.log | while read serverline || read... (8 Replies)
Discussion started by: MyMorris
8 Replies

8. UNIX for Dummies Questions & Answers

Specifying read on dir user?

If I have a number of users all in the same group. How do I give read only access to some of them on everyone elses home directory. Is it possible if they are all in the same group?? So user1,2,3,4 can have read/execute on user1-5 home directory, but user5 can only read only have read... (1 Reply)
Discussion started by: sniff
1 Replies

9. Shell Programming and Scripting

how other user cannot read my script?

Hi All, If I don't want other user read my script, what can i do? :confused: (19 Replies)
Discussion started by: happyv
19 Replies

10. AIX

AIX Virtualization question for non-AIX user

Hello, My first post to the Unix forums, thanks for having me! The division of the company I work for uses a xseries/redhat/VMWareServer solution to make sure that we keep hardware overhead low and use our machines to as near capacity as we can. These boxes are Intel with usually dual or... (1 Reply)
Discussion started by: greenteabagger
1 Replies
Login or Register to Ask a Question