LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Permission (https://www.linuxquestions.org/questions/linux-server-73/permission-4175555689/)

yogeshtj889 10-09-2015 03:07 AM

Permission
 
Hey I am new in linux and I have query that If I want to give permission to user for particular application for example FTP,Samba,Nfs,Oracle then how can I restrict or give accec to user..

Please help...

robertdaleweir 10-09-2015 10:57 AM

Quote:

Originally Posted by yogeshtj889 (Post 5432049)
Hey I am new in linux and I have query that If I want to give permission to user for particular application for example FTP,Samba,Nfs,Oracle then how can I restrict or give accec to user..

Please help...

Hi yogeshtj889
The best way is to put these apps into a 'group' that you create such as 'apps'. Then add the user to that group along with the 'apps'. I do not know which Linux you have but there are GUI ways to create the Group etc.. See https://www.linode.com/docs/tools-re...ers-and-groups

yogeshtj889 10-10-2015 03:34 AM

hi robertdaleweir
I am using redhat n centos, I can create groups and users but how to put apps in group can u give me any examples, i have read which link u send me....

robertdaleweir 10-10-2015 12:31 PM

Quote:

Originally Posted by yogeshtj889 (Post 5432433)
hi robertdaleweir
I am using redhat n centos, I can create groups and users but how to put apps in group can u give me any examples, i have read which link u send me....

Hi yogeshtj889
You add a user to group using
Code:

groupadd apps
Then use
Code:

useradd -G apps firstuser
Then add user ftp to group. Then use
Code:

useradd -G apps ftp
User names (for the applications) are in /etc/shadow and can be seen by
Code:

cat /etc/shadow
first column.
I found this at http://www.cyberciti.biz/faq/howto-l...user-to-group/ as I do not have Centos, but it is quite generic. Add all the applications users like 'ftp' etc to the group and that should give your users access.

michaelk 10-10-2015 01:41 PM

Your question is not very clear because those applications are server/client programs. Since you posted in the linux-server forum than the assumption would be to limit users connecting to the linux box.

The previous posts would limit users logged in from running the client ftp program to access other networked computers but not restrict other computers from accessing the linux computer.

samba is a network protocol that allows windows to access files and printers on a linux computer which is the server part and a client that lets linux access windows files and printers which is the client part. If you want to limit server connections you would restrict users by configuring the /etc/samba/smb.conf file.

ftp has its own configuration file and it depends on what ftp server you are running. In most cases there is little reason to run an ftp server and you should use sftp instead. For sftp you would limit users via the /etc/ssh/sshd_config file.

You can limit nfs access via the /etc/exports configuration file.

With oracle permissions are granted by adding a user and giving it password and then allowing it access to tables etc via the system user.

yogeshtj889 10-10-2015 02:55 PM

Thankyou both I have understood the concept now....


All times are GMT -5. The time now is 06:05 AM.