General :: Assign Read Privileges To User On Specific Directories And Files
Jan 26, 2011
I am using CentOS 5.5 and I created few users (useradd john etc.) and now I want to assign privileges to this user on some directories and files in those directories. For example I want to give read privileges to directory "/documents" and all of files under that directory.
suppose in my current directory, I have 50 sub-directories. Now, I am interested only in about 20 of those sub-directories (whose names match a pattern). I would like to recursively list the contents of these 20 sub-directories. How do I do that ? I would like to do this in Solaris 10 and Linux(RHEL 5.x).
I am new to ubuntu and just installed the vsftpd service by this tutorial: [URL]. Now my question is how can I give users rights to one specific folder? useradd username -d /home/folder/new Thats the command id used but when I login to the ftp the user is able to see all other folders as well ..
I want to be able to assign the group "readers" read access to guests/c1 but it says access denied. but it shows r-x acsess. i want to be able to control who has read access and not just give it to everybody.
Unless your distro has taken care of it Centos 5.5, you'll need to create a user with a password and read/write privileges for program database. You can do this using the MySQL command line client if you are familiar with it. Well I am not familiar with it, so I wam wondering how to do it. As well when I run
mysql - p program </usr/share/program/mysql.sql>
It asks for a password. how do i find out this password.
I'd like to create a tar file on my machine to distribute software to other machines which are all alike (including, usernames, groupnames, etc). I need to create certain files and directories with specific owners on the target machine. In order to do that, I use
Code: tar --create --owner=someone --group=somegroup --file package.tar files. However, for this to work, someone must be in my /etc/passwd and somegroup must be in my /etc/group. Is there a way to fake this so I don't have to create a bunch of users only for that purpose?
I have a vary unique problem with file and directory ownership. I need to change the ownership of multiple files and directories under a specific subdirectory.Under this directory structure there are files and directories owned my different users and groups. I need to change all files and directories owned by "user1" to "user2". but if any are owned by "user3" I need those left alone.Is there a simple way to do this or will I need to traverse the structure and change things one at a time.
i am in need of linux help. iam at college and i need this back/restore script to pass this final part of an assessment. i require a backup script that will not only backup but also restore files to the relevent directories. e.g. users are instructed to store all wordprocessor files in a directory named wp. so i am needing to create a backup directory and 3 directories within that and some files within the 3 directories and then back them up ot restore them. l know i should/have to do this myself by been trying to get/understand info for the last few days and came up with zero.
I have a dir (pub_html) with 45 sub dirsand in each there is a file with name file123.html) what command can I use to rename all files with this name in all sub dirs to file456.html ? I'm on opensuse 11.3
I need to create a user in Fedora Linux(15) which only has privileges to print documents.Our college issues a printer to each lab and I need to create a new user on my Fedora which only has privileges to print.Network sharing is not an option, so is there any way by which I can a restrict a user from executing any commands except the necessary printing commands?
I have written an init script which I have kept under /etc/init.d, I need to create links to the directories rc0.d, rc1.d, rc2.d, rc3.d etc.. So that I can use chkconfig command to control the starting and stopping of the script at specific runlevels.
I am writing a script, in that my requirement is, if all the fill types stored in one directory from that we need to separate different different directories based on the file types.
for example in a directory(anish). 5 different types files 1- directory 2- .txt files 2- .sh files
like that and my requirement is the (1- directory is moved to one new directory(dir) which we are given in the script)and (2 .txt files are moved to another new directory(test) which we are given in the script)and ( 2 .sh files are moved to another new directory(bash) which we are given in the scrip)finally the directory anish should be empty..using bash script.how it is possible !!
How do I copy and/or move files to the base folder of a user? I don't know what is is called, so I do not know what to put in the my file "?" command? I know you would normally put mv filename /directoryname, but what is the base username called?
I need to create a special linux user account that has a very limited set of permissions on the system. Essentially to have read-only permissions for his home dir (and sub dirs) and nothing else - i.e. this user has no write or execute permissions and should not be able to read/access other user dirs or indeed anything outside of his home directory, irrespective of rwx permissions.
How to allow access to some commands having root privleges to be run by non root user. I am new to unix/linux and I have a major assignment. I have to find ways to run particular commands which can be run only by root from a non root user. I know sudo is one of the way but i need some different approach.
How can I assign a directory to a specific partition (another hard drive)?How would someone move / home/ username/music to another drive or partition? But do so in a way that it no longer writes MP3's (or FLAC) files in the original directory of the root drive?
I am using ubuntu 10.04 and opensuse 11.3. I would like to know how to assign each application to a specific worksapce. For example，when I open a pdf file, it will be moved to workspace2. When I open a movie, it will be moved to workspace3. In Leopard, "Space" have such features. I would like to know the way to achieve this in ubuntu and opensuse, in an easy way, meaning that just need to install a small package, not a big one , like compiz
Using Ubuntu Server maverick here - after altering /etc/network/interfaces to use a static ip and checking /etc/resolv.conf (no alteration needed) no network services were working at all. Here are the contents of interfaces:
Code: auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.0 gateway 192.168.1.254
I was fairly certain that this was verbatim from my previous server which is no longer attached to the network. After hours of fooling around with no success I changed the address to 192.168.1.99 and it worked perfectly. So my question is: why? My old server used 100. Could the router refuse to give a new server the same address or something like that since that address had been taken in the past?