General :: Giving Ownership While Creating Directories?

Jan 27, 2010

Is there any way by which one can give ownership while creating directories itself. It should be one command otherwise it requires root login to change ownership of a directory.

View 4 Replies


ADVERTISEMENT

General :: Creating Multiple Directories?

Mar 28, 2010

I need to create subdirectories in about 300 existing directories - the subdirectory will have the same name in all 300 existing directories. How do I do this using the mkdir command using a regular expression or globbing?

View 3 Replies View Related

Ubuntu Servers :: Change The Ownership Of Multiple Files And Directories Under A Specific Subdirectory?

Feb 19, 2010

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.

View 3 Replies View Related

General :: Command Line - Create Directories That Don't Exist While Creating A New File?

May 8, 2010

I can do:mkdir messages and then: touch messages/hello.txt Is there a command that will do both - create the directory if it doesn't exist, and then the empty file? Something like: touch -p messages/hello.txt

View 1 Replies View Related

General :: Creating A Script To Move Or Copy Files Into Multiple Directories Below The Files?

Aug 25, 2009

How can you create a script to move or copy files from a main directory into multiple directories below the main directory.

View 7 Replies View Related

Ubuntu :: Creating Directories Owned By Specified User

Jul 15, 2010

I have just installed an SSD as a secondary hard drive and formatted as ext4. (the Ubuntu installation is on a different drive)how I would go about creating a directory on the SSD that is owned by the user 'Test user'.

View 8 Replies View Related

Server :: SVN And SSH - Creating Directories For Projects In Repo

Feb 18, 2011

I am setting up an SVN server (svn+ssh) that will be used by students at the university where I work. I was considering in the beginning, one single repository and eventually creating directories for each project inside the repository. It seems to me now, that it is not very secure way of doing things. The directory on the server will be with rights 770 and this means that every student can come on the server and sweep out the whole repository.

Also mistakenly or not, every student can 'svn delete' the whole repository, which could be a nightmare to recover from. An issue might be to create groups and then assign users to groups and then create many repositories and each repository to be assigned with group. This means that I will have to manage tens or hundreds of repositories -- maybe not very common task. What is an optimal solution for this working environment.

View 5 Replies View Related

Ubuntu :: Rsync Creating Wrong Permissions For Directories?

May 1, 2010

I try to use rsync for backing up some directories and I have to following problem: some files have permissions that prevent me from running rsync under my own user id. So I run it under root using the option "-a" which according to the man page should preserve the permissions, owner and group information:

However, when I run this under root, the directories created in the backup location get user root and group root while ordinary files keep the original user and group. What am I missing here? How can I get rsync to preserve the user and groups for all files, including directories?

Here is a command to illustrate my problem
Code:
sudo rsync -a /home/youruser /tmp

If you try that and terminate with Ctrl-C after a few seconds, there will be a directory /tmp/youruser where the directories contained within are owned by root group root.

View 2 Replies View Related

Ubuntu Installation :: Creating Directories Owned By A Specified User On SSD?

Jul 15, 2010

I have just installed an SSD as a secondary hard drive and formatted as ext4. (the Ubuntu installation is on a different drive) Im very new to linux, Could someone inform me how I would go about creating a directory on the SSD that is owned by the user 'Test user'

Im sorry if this is a daft question, im just moving from windows to linux and struggling a lot.

View 3 Replies View Related

Software :: Creating A .deb File That Extracts Files To Pre-determined Directories?

Oct 21, 2010

I am wondering how I would go about creating a .deb file that would extract it's contents to two different folders. I would have one file directory that should be extracted to /opt and I have a second that should bextracted to the current user's home folder and /etc/skel - How would I go about doing this?

View 1 Replies View Related

Ubuntu :: Automate Creating Directories Based On File Names And Moving Files Into Them

Apr 30, 2011

I have a bunch of .7z files in a directory, and I need to put each one of them into a separate directory, named after the file (without extention). The command line I use:

Code:
find . -type f | mkdir `sed -e "s:..(.*)...:1:"` ; ls | grep .7z | cp * `sed -e "s:(.*)...:./1/:"`
Copying fails though:

[Code]....

PS. I don't want to use scripts, I want to do it using simple commands and piping.

View 5 Replies View Related

General :: Create A Backup Directory And 3 Directories Within That And Some Files Within The 3 Directories And Then Back Them Up Ot Restore Them?

Dec 19, 2009

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.

View 14 Replies View Related

General :: Multiple Users To Create Directories Over SFTP So The New Directories Keep The Same Permissions?

May 15, 2011

I want to make a webserver with multiple users allowed to login through SFTP to a specific folder, www.Multiple users are added, lets say user1 and user2, and all of them belonging to the www-data group. The www directory has an owner www-data and a group www-data.

I have used chmod -R 775 on the www folder, but after I try to create a folder test through my SFTP server (using Filezilla) the group of the directory created has only r and x permissions, and I am not able to log in with the second user user2 and create a directory within www/test due to a lack of w permission to the group.

I also tried using chmod 2775 on www directory, but without luck. Can somebody explain to me, how can I make it so that a newly created directory inherits the root directory group permissions?

View 2 Replies View Related

General :: How To Store Files / Directories In Different Different Directories?

Mar 23, 2011

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 !!

View 7 Replies View Related

General :: Replacing Ownership Of Certain Files?

Jan 30, 2010

Is there any working commandline alternative to # find /some/dir -group xxx -user yyy | chown xxxxx:yyyyyThe main purpose is to replace ownership and goup of certain files in subdirectories. Or nevertheless I need to write shell script for that simple operation ?

View 5 Replies View Related

General :: Ownership For All Members Of Group

May 27, 2010

Can I assign ownership of a particular file to everybody of a group?If the file had rwxrw-r-- permissions, will every member of the local-group have owner access privileges (rwx) to this flie now?

View 8 Replies View Related

General :: Restrict Device Ownership To Root Only / Why Is So?

Jul 6, 2011

NSA's Guide to the Secure Configuration of Red Hat Enterprise Linux 5 recommands restricting device ownership to root only.

So my question is why should we restrict device ownership to root? And what does device ownership mean anyway in Linux?

View 2 Replies View Related

General :: Centos Network Settings And Ownership?

May 21, 2011

Installed 5.6 and all is well except my window pc doesn't see the centos laptop on the network, but it is on the network. I have access to the Internet via firefox. Obviously need to set some ipconfig settings, but when I try to edit ipcfg file in sbin, I get a msg, "not the owner, can't save". Is sbin the right directory? Is ipcfg the right file to edit?

View 6 Replies View Related

General :: Change Ownership Of An Entire Directory?

Jul 2, 2010

Installed Sidux over LennySidux didn't want to take my usual username, because a folder with that name existed in my home directory.So, I just mounted the home partition and changed the name of my home directory from shay to shay1.Don't know what that did or didn't do permission wise to the files in my old home directory, but I've got a few unowned files floating around my home directory anyway that have been dragged in from old harddrives and such.

View 3 Replies View Related

General :: Root To Change The Ownership Of A File?

Jun 17, 2011

Why would I need to be root to change the ownership of a file? Example: I'm logged in as dwadmin and I've created a file:

-rw-rw---- 1 dwadmin dgw 0 Jun 17 07:46 testing.txt

I want to change the ownership to another user, but am getting the following error: chown 511 testing.txt chown: changing ownership of `testing.txt': Operation not permitted

View 5 Replies View Related

General :: File Permissions And Ownership Getting Screwed Up

Sep 15, 2010

Is it possible to let users create the directory or files but only user "yat" can delete them.suppose other users are geller ross joe from group FH , who have privileges. whenever these users create file or dir , they should not able delete it.BottomLine: Group users should create file but should not be able to delete them.By the way using sgid bit didnt help .

View 14 Replies View Related

General :: How To Change Home Directory Ownership

Jun 24, 2011

I've already done the following commands

Code:
su
chown theif519 /home/theif519
chmod 775 /home/theif519
exit
#usermod -d /home/theif519 login

I've logged out and logged back in, and I was successful in making it the default directory it logs in to. Still, afterwards I noticed that that when I use the list all commands "ls -l" it shows that root owns it and it also shows that I do not, by default, have read write execute over it, only read execute. I'm using Slackware 13.37* in a Virtual Machine* Another thing, I don't think I added any rights to my user, how do I give it more rights as well? Like, wheel and sudo and all of that stuff. Also, this was the website I was using *Although it didn't help much, the comments sure did [URL].

View 4 Replies View Related

General :: How To Change Ownership Of Mp3 Player From Room?

Oct 16, 2010

I am a Linux Noob of the major kind.I have an MP3 player that is owned by root. I have a SANDISK it in also. I can copy files to the player despite it being owned by root but I can't copy them to the SANDISK which is also owned by root. So what is suppose to be after the colon?How do I determine what that is if it is a directory?How do I change to root to change ownership if that is what I need to do?Is there an application that I can use to change ownership easy and what user do I have to be to do that.

View 5 Replies View Related

General :: Changing File And Folder Ownership From Root?

Oct 11, 2010

I created a folder structure as root and now need to transfer ownership to an ordinary user.

This question is linked to this one - [URL]

I have a folder /srv/app-share that needs to be visible/writeable to user1

I tried (as root):

root@server [/]# chown -R user1:user1 /srv/

But that did not work.

View 1 Replies View Related

General :: Change Permissions And Ownership For NTFS Mounts?

Apr 19, 2011

I finally replaced my Windows with Linux.. However, I need to run applications and modify files that are on NTFS mounts. I am unable to change ownership, permissions, and groups on these files so I may modify them without having to copy. I have several times attempted to chmod, chgrp, chown, etc.. while logged-in as root user; however it is to no avail. The owner and permissions are still geared towards root. can I change ownership and permissions on NTFS files so I can modify them without having to convert/copy them over to ext4 or different file system?- Matbtw: I am using OpenSuse 11.4 and running Windows apps with VirtualBox (with Vista installation image). I still have Win7 on my computer (non-emulated) and I would like to keep some files on those NTFS partitions so when I occasionally need to boot into Win7 I can modify those files because Windows blows and doesn't support Linux.

View 5 Replies View Related

General :: Knoppix Data Recovery Ownership Permissions?

Jun 4, 2011

I use Linux but have a computer with windows I use for gaming. It died and put the hard drive into another computer and used knoppix to recover my files. I looked at the ownership of the windows files and the owner is knoppix. Now I am concerned that ownership will not work on my new Windows computer (when I finish building it, that is). Since I don't get into Windows much I have no idea what those permissions should be.

If I copy them with owner knoppix can I even access them in Windows to change the ownership to whatever Windows will accept? If I change the ownership before putting them on a CD with knoppix, can I write the CD? I will have to use the hard drive on the new windows box so will not have access to the files later (unless I also copy them to my Linux computer for safekeeping). At least I know the ownership changes to make with Linux.

View 2 Replies View Related

General :: Changing Ownership Of 'file Name' : Operation Not Permitted

Oct 14, 2010

I`ve been given a project to design a program that will interface with a hardware device through the parallel port.And so far it`s not going go. I managed to write the programe an compiled it, but when runing it the compiler says: 'changing ownership of'and then the file name then it continues to say, 'operation not permitted'.

View 9 Replies View Related

General :: Effect Of Attempting Change Of /FS Ownership Or Rwx Permissions

Aug 9, 2009

My system (CentOs5.3) became erratic after i tried to change wholesale the ownership of the /FS. is it possible to change ownership or rwx permissions of files in linux? what is the safeguard available to preserve the consistency of the program files in linux against such an attempt by su?

View 2 Replies View Related

General :: Renaming External Files Changing Ownership Instead Of Root

Mar 28, 2011

i have inherited a mixed bag of sorts: several xp users updating an access mdb with the BE on a lamp stack shared via samba. i have a backup device which gets mounted at: /media/disk... each client record (has) a folder by the companyname on the samba share, and all relative documents are placed there. when the backup script runs, it just copies newer or missing files.

someone has been renaming folders, and not matching the folder name to the related companyname from the mdb. so...the backup script captures and duplicates the data in the renamed folders. some client records also have periods in the name (not required from a data pov), such as 'Company Ltd.' instead of 'Company Ltd'. i can produce a list of company names as the folders should be found easily enough, but get a little stuck with the linux scripting.

i can easily remove and further prevent any unwanted punctuation in the company name on the client record, and create the correct folder name on the samba share with vba, but would also like to:

-for each 'client activity' folder on the backup device
-rename the folder by removing punctuation marks
or
-delete the folder if is a dupe

i tried: ls -al | grep '&' - it properly returns only those lines with an ampersand in the folder name, but returns all folders when i try that with a '.'.

what would be the easiest method to do the renaming? i thought if there was a way to change ownership of the mounted device, then the vba code (easy to write) would be simple.

OK - i just ran chown -R on the external device, changing ownership to (me) instead of root. didn't want to because it took too long, but can now use the MoveFolder method of the filesystemobject from my app to do the renaming instead of some sort of bash script (which i was dreading).

View 1 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







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