General :: Giving User Write Access To Directory And Subdirectories

Aug 10, 2010

I need to give a user write access to /var/www and its subdirectories. The current directory permissions are as follows:rwx r-x r-x root root

I added the user to the root group but that didn't seem to help.I read I could chmod -R to change the access to write for the www directory and subdirectories but I don't want to change things and mess up the website. How can I give the user access to write to the www directory and subdirectories without messing anything up? Would changing the www directory group owner to his group cause an issue anywhere?

View 3 Replies


ADVERTISEMENT

General :: Find Files In Subdirectories And Copy Them To Another Directory With The Same Subdirectories?

Nov 18, 2010

This question is very similar to this one except that I want to maintain the file's original subdirectories.

For example if I had

/temp/a/a.txt
/temp/a/a.jpg
/temp/a/b.txt
/temp/b/c.txt
/temp/d/d.txt
/temp/d/d.jpg
/temp/d/e.txt
/temp/f.txt

[Code]...

View 2 Replies View Related

General :: Best Way To Allow A User To Write To The /var/www Directory?

Mar 3, 2010

On my laptop for testing, I simply chown each subdir of /var/www to my myuser:www-data. But, now that I am setting up a public facing server, I'm wondering if this is the proper way to do so? If not, what is the best way to allow a non-root account to write to /var/www.

View 4 Replies View Related

General :: Give User Access To Directory In Another User's Home

Mar 8, 2010

I'm developing an application in which one user must run java software that I'm compiling as another user. I wanted to give user A permission to see the bin direcory of my workspace, which is in the home directory of user B. I was wondering how can this be done? I gave the bin direcotry full read/execute premissions, but since it's in my home directory user A can't navigate to it.

I know there are a few ways I could get around the problem but they arn't very elegant. I was wondering if there is a simple method for giving a user access to a specific directory without giving access to all the parent directories. I tried symbolic link but user A still can't access it, and a hard link to a directory isn't allowed in Linux. I don't feel like making a hard link to every single file in the bin directory, and I'm not sure that would work anyways, since every recompile overwrites them.

View 7 Replies View Related

General :: Root User Using Freshclam Command Cannot Write To Directory?

Jun 27, 2010

When I log on a root and attempt to issue the command Freshclam to upgrade the virus definitions it attempts or create a new file with a definition name. I get a message stating that the directory isnt writable. The user and group access rights are as follows:

USER = read, write, execute
Group = read, write, execute
All= read, execute.

The only way I can get around this is by applying a 777 which would be read, write and execute for all. Now, I have a group define with several user ids in it including Root.How do I connect the group with the directory/file so I dont have to apply a 777 access right to group users could issue the Freshclam command.

View 1 Replies View Related

General :: Administration - Managing SAMBA Shares And Giving User Specific Access For The Shares

Jul 28, 2010

I am working as a Linux administrator in a very small data centre with 5 servers with following routine tasks.

1. Managing SAMBA shares and giving user specific access for the shares.
2. Scheduling backup of some mount points with rsycn to store data in remote hard disk
3. User and group administration, with sudo access.
4. Creating and Managing Xen Virtual machines and giving access to other project teams.
5. Automating some tasks with Shell Scripting.
6. Managing FTP server for user uploads.

I have practiced a lot in my home laptop without RHEL training, Cleared RHCE and LPIC1. I want to do some advanced system admin tasks, but do not have option in my current data centre. With Above skills is it possible to get a job ?

View 9 Replies View Related

General :: User Write In A Subfolder When Can't Access Parent?

Jul 13, 2010

I was wondering, i have a webfolder and have permissions set to 770 with group being www-data. I would like to give access to one folder to a friend so he can edit images, css, etc. I made that folder 770 with group being site_name with www-data and him being in the group. So far so good it sounds like. However when i use the full path to the directory linux says it doesnt exist.

Is there a way i can make it so he doesnt have r/w file on files inside the parent directories and still access the directory i want to give him?

View 1 Replies View Related

General :: Write A Shell Script Which Will Read The Directory Path As Input From User?

Nov 28, 2010

I am new to writing shell scripts. So, please bare with me. I am currently trying to write a shell script which will read the directory path as input from user and will traverse the Dir tree to find all available audio and video files. I have tried to write as much as I could but I don't know where I am making mistake as I get some files to be audio file which are actully tar balls. On the second note there are some files which video but script shows them to be audio. And, some video files are completely skipped. I am giving the shell script below so that you can see. I am using two external files as source which I am attaching.

Code:

#!/bin/bash
#Let's load the extensions that we want to search for
vdExt=$(cat vdExtList)
adExt=$(cat adExtList)

[code]....

View 5 Replies View Related

General :: Write A Script To Report Useful Information On Disk Utilization For Each User's Home Directory

Feb 27, 2010

I need to write a script to report useful information on disk utilization for each user's home directory.For each directory I need to show: 1. the long listing of that directory entry (but not the files in the directory), so that I can see the rights and owners of the directory.2. The amount of disk used by that directory, in human-readable format, including subdirectories. I need to have two lines for each user one after the other. For example:

/home/user1 directory info
/home/user1 disk usage
/home/user2 directory info
/home/user2 disk usage

The script will assume that all users, except user root, have their home directories in the /home directory (no need to do anything with the /etc/passwd file). And if the administrator adds or removes users, the script should still work correctly (so the script shows the information for all current users).

Here's what I do know. The command "ls -ld /home/user's_name" will give me the info I need for #1. And the command "du -hs" will give me the info I need for #2. What I don't know is how to grab each individual directory in order to apply the above commands to each of them in order. ???

View 14 Replies View Related

General :: Create An SSH User Which Can Access Only Certain Directory ?

Jun 18, 2011

I have a Virtual Private Server which I can connect to using SSH with my root account, being able to execute any linux command and access all the disk area, obviously.

I would like to create another user account, which would be able to access this server using SSH too, but only to a certain directory, for example /var/www/example.com/

For example, imagine this user has a HUGE error.log file (500 MB) located in /var/www/example.com/logs/error.log

When accessing this file using FTP, this user needs to download 500 MB to view the last lines of the log, but I'd like him to be able to execute something like this:

Therefore I need him to be able to access the server using SSH, but I don't want to grant him access to all server areas.

View 2 Replies View Related

General :: Configure That No Any FTP User Can Access Other FTP Users Directory

Jun 18, 2010

I configured FTP server on Fedora 7.0 . I create different users with different password. I also create seprate directory for each FTP user. All are working . When I use filezilla for connecting that FTP site I can access all the directory on that server.

Now I want to configure that no any FTP user can access other FTP users directory or any other directory in server machine . What I do for this .

View 1 Replies View Related

General :: Find All First Level Subdirectories Under The Current Directory?

Jan 24, 2011

1. How can you find all first level subdirectories under the current directory?
2. How will you show the last 100 lines of the file "foo.log"?
3. How will you Stream the contents of a the log file "foo.log" as it gets written to?
4. How can you grep for a pattern on a gzip'ed file? e.g., find "foo" in bar.gz
5. Find all lines in the file "foo" which DON'T have the pattern "bar"
6. Your web server is running very slowly. If you can login to the server, what command will you run to find out cpu and memory use?
7. Extract the file foo which is a part of the tar'ed, gzip'ed file bar.tar.gz
8. You attach a usb disk to your linux desktop, but it does not show up. How can you get more information about the error?
9. What is the secure way to login to remote systems?
10. What is the difference between TELNET and SSH?
11. Given a file 'a' with the following permissions -rwxrwxrwx 1 rohit rohit 0 2011-01-24 13:30 a Change its permissions such that it is only readable and writable by its owner, not accessible by anybody else in the group and only executable by the world
12. Difference between using ' and " for quoting a string / command in a shell
13. In the attached text file (test.txt) replace all occurrences of 'red' with 'yellow' without using an editor (i.e. from the command line)
14. How would you suppress output written to stderr by a command
15. Meaning of the #! notation in scripts e.g. #!/bin/sh
16. What is the output of the attached shell script test.sh Scripting questions, all based on the attached file access.log. Use one of perl, python, ruby, or shell scripts to solve these questsions. If any answer is obtained using just the command line, please include those commands as well.
17. How many accesses were made between 10am and 11.30am on Jan 24, 2011?
18. How many unique IP addresses accessed this server?
19. For every IP address which accessed this server, output a report showing number of hits for every type of HTTP status. For e.g., IP 192.168.1.20 has 164 hits with status 404 and 1690 hits with status 200.

View 8 Replies View Related

General :: Copy All .jpg Images In Subdirectories To A Specific Directory?

Aug 5, 2010

I have .jpg files in many subdirectories from where I need to copy all the images from all the sub directories and paste them to a specific directory.I have used `cp -rf *.jpg media/sik/` which only copies the .jpg files of the directory in which I was working.

View 5 Replies View Related

General :: Trying To Display Count Of Number Of Subdirectories In Directory

Feb 7, 2011

I am a noob and I am trying to display a count of the number of subdirectories in a directory. I have been able to use find -type d to list directories and subdirs but I want a numerical value of dirs and subdirs. I know ls -l gives a count but when I try ls -l -d all it shows is "." I also have tried a combination with the -R option but nothing seems to be working for me.Please forgive my ignorance but I am working on a script for class and this is the first step.

View 3 Replies View Related

General :: Recursively Remove Subdirectories And Files But Not The First Parent Directory?

Feb 11, 2010

I'm able to use the following to remove the target directory and recursively all of its subdirectories and contents. find '/target/directory/' -type d -name '*' -print0 | xargs -0 rm -rf

However, I do not want the target directory to be removed. How can I remove just the files in the target, the subdirectories, and their contents?

View 4 Replies View Related

General :: Script To Open All Subdirectories Of A Single Directory And Then Run A Command?

Mar 24, 2010

I am trying to write a very simple script that will go to every subdirectory of a single directory and run a command (lets call it make_ndx).I know I can write this the long way with in a text document with something like:

cd /"the directory"/"the 1st subdirectory"
make_ndx
cd ..
cd "the 2nd subdirectory"
cd ..

Alternatively, I also tried: for i in 'find /path/somemorepath -type d -mindepth 1'; do cd $i; make_ndx -f *.gro; done which returns me with the error cd: find: no such file or directory. But if I run the find command by itself to test if I am calling the right directories, it gives me the exactly the output I am looking for. Any ideas? Should I just write the find results to a file and loop through the contents of the file (which seems a little bit like overkill) or am I just making a simple typographical mistake and I am just not seeing it?

View 7 Replies View Related

General :: Allow Normal Users To Mount Tmpfs Under Subdirectories Of Their Home Directory?

Oct 11, 2010

How can I allow normal users to mount a tmpfs under any subdirectory owned by them?

View 3 Replies View Related

Ubuntu :: Access User Account 1 Home Directory From User 2 Work Space?

Jun 16, 2011

Do you think there is a way of accessing different user data from another account which I have set up.

Ie. user 1 = account has messed up

user 2 = account works fine

access user account 1 home directory from user 2 work space?

View 9 Replies View Related

General :: Command Line - Automating A Task - Copy All Subdirectories And Files From One Directory To Another

Jun 10, 2010

I need to copy all subdirectories and files from one directory to another ever 5 minutes or so, with the old data automatically being overwritten with the new data. I'd also like this to run at startup. Is there any way this can be done? If so, what program would I need to schedule the automation and what is the command line I would need.

View 2 Replies View Related

Ubuntu :: Unable To Write Access To Home Directory

Jun 27, 2011

kernal 2.6.38-8 After updating Kubuntu-the log in screen will not progess to the desktop. It freezes and then shows the message "no write access to the home directory.." Goggling the problem - references to an .ICEauthority in my home directory are mentioned as linked to this problem. However "ls -la /home/charles" reveals that there is no .ICEauthority file present.

View 6 Replies View Related

General :: Giving Rm Root Privilege For A Particular Directory

Jul 7, 2009

I want to give root privilege to the command rm for only a directory Dir inside /local/home. How I can do that?

View 9 Replies View Related

General :: Write A Shell Script Which Will Simultaneously Collect OS User Information And Write In An Individual Text Files?

Feb 17, 2010

I want to write a shell script which will simultaneously collect OS user information and write in an individual text files.Can anyone tell me the syntax of the script.N.B. The user name will be mentioned in an array within the shell script.

View 8 Replies View Related

General :: Set Up User Account To Avoid Giving Much Power?

Jul 30, 2011

I will be setting up a computer for people who have very little experience using computers and I want to limit their ability to break things. I'm thinking Linux is the way to go but I don't know what distribution to use. I don't know anything about their hardware other than it is an old laptop. I don't have a lot of experience with Linux, but I would think that without sudo there is not a lot of things you can break.

What would be a good Linux dist that has everything out of the box? (flash, vnc, office, etc) How should I set up the user account to avoid giving them too much power, yet still allowing the computer to be useable for daily tasks? (Will they be able to update software?) I also want to be able to control the machine remotely since I won't have physical access after I set it up, so I am looking into ssh, vnc, (or a better alternative?).

View 2 Replies View Related

Networking :: Run The Job Under A Root Account And Deny Read/write Access To A Normal User?

Jan 18, 2010

I'm setting up Ubuntu Karmic on my sister's old computer for my nephew, he's quite young so my sister asked to install some content filtering. I'll first setup an OpenDNS account and I've installed and managed to get dansguardian and squid working on a virtual machine to try it out. so far it's working pretty well, but I need to secure it form the inside out.

I was thinking of blocking specific outbound ports so he could not bypass the proxy. because by default the firefox configuration can be easily changed. so I have a couple of questions.

1. is it possible to block outgoing ports on Ubuntu?
2. is that the best method?
3. is there anything else I should be aware of to prevent subversion?

lastly, this question is probably unrelated to this board but I've set up a cron job to update a dynamic ip with OpenDNS, the problem is that the password is in clear text in the user's crontab, can I play with permissions? is it possible to run the job under a root account and deny read/write access to a normal user?

View 1 Replies View Related

General :: Copy Files From Directory Of One User To Directory Of Another User?

Apr 15, 2011

Is it possible to copy files from directory of one user to directory of another user in linux?

View 7 Replies View Related

General :: Write A Shell Script That Allows Only User 1 And User 2 To Execute A Program?

Feb 25, 2010

I've looked everywhere but I can't find where to change the default box for incoming mail, or am I on the wrong track. It's a nuisance having to change folders and I can't configure wastebin to empty on exit.And I can't get kmail to import from evolution. Do I have to go to the evolution storage and do it manually, and if so, how do I do that?

View 1 Replies View Related

Ubuntu :: Letting User To Access Only Particular Directory

Jul 6, 2011

I'm using Ubuntu x64 10.04 edition. How can I set only one particular directory (and it's contents) to be accessible to a user while make everything else inaccessible for him? I already added the user by using adduser command.

View 2 Replies View Related

Server :: Allow Access To Directory Only To Single User

Jun 30, 2010

I have a file server on my network. It is accessed mainly by linux machines throught NFS, but sometimes I need to access it from windows, and I managed to get Samba up and running with only one share with no password, which is what I want.My users have their "private" folders which are just chmodded 700, and under NFS it works fine, but on samba I get, of course, access denied.How can I configure samba so that it asks a password to access those directory? They can become separate shares, and have their own username and passwords (not the ones in /etc/passwd in the server), I don't care.

View 1 Replies View Related

Ubuntu Networking :: Sharing Directory, And It's Subdirectories?

Oct 20, 2010

I've been doing some file-sharing with Ubuntu. And I've noticed that the files only in the immediate directory is shared, the rest of the folders are shown in other PCs but access is denied. How can I share all the subdirectories in a folder without having to them manually?

View 6 Replies View Related

Ubuntu Servers :: Allow Sftp / Ssh User Access To Only One Directory

Mar 20, 2011

i want to allow some friends to ssh/sftp/scp into my system but i only want them to have access to my external hard drive (/media/externalHD/), and i dont want them to be able to delete or add anything, only download.i have found instructions on how to limit a user to his/her home directory and thought about just creating a user with the home directory /media/externalHD but idk if this will work and im afraid i might make a mistake and delete 800gb of 'files'

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved