Ubuntu :: Recurse A Subdir Tree To Apply Chmod And Chown And Ls -al?

May 30, 2011

Need to recurse a subdir tree, to apply chmod and chown and ls -al .

chmod -R xxx yyy does not function properly; -R is nonfunctional.
chown -R xxx yyy functions OK.

Is there a script which will follow a subdir tree and open each subdir ? glene77is

View 9 Replies


ADVERTISEMENT

Ubuntu :: Using /etc/crontab To Force Chown And Chmod In Specific Directory?

Feb 9, 2011

I need to actively make sure some files, in a specific directory, are chmod 750 and owned by transmission:media-daemons. Other users will save to this directory, with other permissions and UID/GID but I must make sureto reinforce this default.

So I have this on my /etc/crontab:

Code:

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

[Code]....

View 1 Replies View Related

Fedora :: Chgrp Chown Chmod Resetting After Boot

Aug 30, 2011

I'm trying to make a particular file accessible on my computer ( /dev/uinput ) without having to use sudo or su - I've set up a wiimote to act as a remote for my media player, and it requires access to that file. When I use chmod, chgrp or chown to change the file's settings, it enables access to the file - however, when I reboot my PC, the settings get reset, and I have to change the access rights when I first use it again. I've tried using the following commands to make the changes (substituting my username/groupname as user and group below), as root:

[Code]....

View 2 Replies View Related

OpenSUSE :: Added Second Hard Drive Now Can't Chown Or Chmod

Mar 29, 2010

I occasionally get into areas in Linux where I get my own ignorance demonstrated....System is a core quad running OpenSuse 11.2 64 bit on a LAN at home. I added a 750 GB SATA drive with the idea of putting all media on the drive i.e.music primarily plus a few movies and making the data sharable by anyone across the LAN i.e. the computer in the living room with an audio line to the stereo. My room mate is strictly a Windoze user so I figured if she wanted stuff on her machine as well then format the new drive with NTFS which I did using GPartd. I then set the drive to mount as /storage under root.

I loaded the music library &c and although I can play music from my user account on this machine I can not add music or videos or anything else except as root. I dont want to have to change to /root to do this. I attempted a chmod tonight as su from a terminal then in the root GUI using dolphin and resetting the permissions under properties and nothing changes. The drive appears in the filesystem as /storage with ownership as root. The permissions are

drwxr-xr-x 1 root users 4096 2010-03-27 22:55 storage

trying to chmod as root has no effect at all. I would like to be able to add content from any machine on the LAN plus be able to play a movie or video as well as music (I assume this would need the execute permission) but chmod -R 777 storage has no effect. Neither does cd'ing to the directory and trying to change ownership or permissions on the individual files or directories on the drive.Command line as su or as root from that gui, no difference. I do a

chmod g+w,o+rw storage

and the command appears to execute.However I ls -l and find the permissions unchanged. I obviously have or am doing something wrong, possibly in the way I set the drive up in the first place.

View 8 Replies View Related

General :: Prevent Users From Executing Chown , Chgrp / Chmod?

Dec 8, 2010

In Linux, how do i prevent users from executing chown, chgrp or chmod?

View 2 Replies View Related

General :: Freecom FSG3 - SU Permission Denied When Attempting Chmod Or Chown?

Apr 27, 2010

I am desperately trying to recover two folders from a Freecom FSG 3 NAS. As far as I am aware it is running Linux 2.6 based on Snapgear. After working through the hardwares' recovery procedure a number of times, the state of the device appears to get worse and worse. So I have attempted to rescue the files by using a program called Putty to access the device over SSH.When I access the device using Putty I login as admin. The folders I need to recover are located in the home folder. Listing the contents of the directory I get...

/home $ ls -la
ls: ./.twonkymedia: Permission denied
ls: ./Sarah: Permission denied

[code]....

View 1 Replies View Related

Red Hat / Fedora :: Re-apply Chmod +r Doesn't Works - Permission Denied ?

Dec 23, 2010

I've a pb on a directory...Same pb with others users... fsck -y says fs is clean...Re-apply chmod +r doesn't works...Data are on local HD (not SAN)

View 1 Replies View Related

General :: Accidentally Did A 'chmod +x Foo' When Meant To Do A 'chmod A+r Foo'?

Jul 17, 2010

I accidentally did a 'chmod +x foo' when i meant to do a 'chmod a+r foo'.

-rw-r--r-- 1 casper trad 53 Jul 17 22:41 filegore
-rw-r--r-- 1 casper trad 13 Jul 17 22:41 filelemme
-rw-r--r-- 1 casper trad 24 Jul 17 22:41 nix

[code]....

View 1 Replies View Related

General :: How To Archive - Tar - Every Subdir

Jul 26, 2010

I am stuck trying to write a script that does the following :

1. loops through all subdirectories of a given directory

2. for each found subdirectory, first create an archive carrying the same name as the subdir itself

3. then moves the actual subdirectory to a different path

Here is what I have so far: my base dir is /home/bob/Bureau, and it contains two sub dirs, "florissant 86 a" and "saule 84" I would like to create one archive for each subdir in /media/public/atelierPhotoArchive and then move the folder entirely to /tmp/photo.write

Everything goes well until I have to either tar or loop through the file with spaces in names

This last statement outputs different lines after each space in my lst file

Question 1: Is it possible to make it output once for each line in the file ?

Question 2: Is it possible to do some exec tar in the find command? I had difficulties extracting the "short" name for the archive ("saule 84") without /home/bob/Bureau, it is possible only with the printf %f, but how in the world can I get this value in to the exec option ?

View 7 Replies View Related

Fedora :: Command Line To Recurse And Delete Filename-1.jpg?

Oct 26, 2010

I just installed Picasa from google and it has corrupted my picture database. The good thing is that it has done it in an organized manner. It appended -1 -2 -3 and so on to the copies file name. They look like (filename.jpg filename-1.jpg filename-2.jpg) the original having no numerical suffix just (filename.jpg)How do i write a command line to remove all of the undesirables without deleting the origionals?

View 7 Replies View Related

Software :: Can't Prepend Subdir Name To Each File?

Jun 24, 2011

To investigate an issue, I need to tarball all the files in a sub-directory without prepending the name of the subdir to each file. For instance, I do notwant tar to include MYSUBDIR:

Code:
/tmp# tar czvf package.tar.gz MYSUBDIR
MYSUBDIR/
MYSUBDIR/file1
MYSUBDIR/file2
I tried "-C MYSUBDIR", or "tar cvPf", but tar always includes the path to the files.

The only way I found is to "cd MYSUBDIR" before running "tar cvf".

Is there a way to tell tar to exlude the subdir name?

View 7 Replies View Related

Ubuntu :: Bash Script To Recurse Directories And Exec Ffmpeg Using Find (possibly)?

Oct 3, 2010

I wrote a script that easily runs it in the same directory as it was run below: #for f in *.MTS do ffmpeg -i "$f" -acodec copy -vcodec libx264 -threads 2 -deinterlace -vpre slow -b 20000k -bt 3000k -refs 4 "${f%.MTS}.mp4" ; #done

I want to be able to use the find command so it will recurse through all the videos in my videos folder. Is there a painless way to do this. Here is the start of my find command but it doesn't work. Any help appreciated:

find . -name "*.MTS" -exec ffmpeg -i 'basename{}' -acodec copy -vcodec libx264 -threads 2 -deinterlace -vpre slow -b 20000k -bt 3000k -refs 4 'basename{%.MTS}.mp4'

View 8 Replies View Related

Ubuntu Servers :: WebDAV - Mountable But Empty Below 2nd Subdir Level?

Jul 3, 2011

I am using Safesync from Trendmicro to backup my data. Since some time I am experiencing heavy problems. Normally my Backup should look like this: But when I am mounting it with WebDAV, it is looking different:

Code:
cdrewing@christian-desktop:~$ sudo mount -t davfs http://dav.trendmicro.safesync.com /media/Safesync
[sudo] password for cdrewing:
Gib bitte den Benutzernamen f�r den Server http://dav.trendmicro.safesync.com an; wenn du keinen angeben willst, dr�cke Return.

[Code]...

Note: When I am mounting Safesync with Nautilus, everything is functional and ok. But I need my command line access because I want to use rsync. A workaround could be to access the resource via the nautilus mount. Where can I find this via the command line?

View 1 Replies View Related

Ubuntu :: Using Chown With Cat?

Jul 21, 2011

I have a list specific list of dirs/files that need to be changed into another users name.I initially thought that this would work:chown -Rc user.name 'cat user.name1.txt' but I get chown: cannot access 'cat user.name1.txt No such file or directory

View 2 Replies View Related

Ubuntu :: Chown And Skip Dot And Dot-dot?

Mar 5, 2011

I issued chown '-hR <user>:<group> *' on a directory. chown also change dot and dot-dot in cwd and all subirectories. How do I go about recursively changing ownership without changing dot and dot-dot?

View 2 Replies View Related

Ubuntu :: Can't Use Sudo After Chown -R User /usr/

Jan 12, 2011

title says it all. I know, I know, a recursive chown, what was I thinking. It was late.

I just straight up:

sudo chown -R user /usr/


Now I can't `sudo', error is "authentication failure".

View 1 Replies View Related

Ubuntu :: Chown As Non-root User (with Authentication)?

Sep 19, 2010

I am currently responsible for administering a shared Ubuntu machine with several unrelated users. Some of these users own multiple accounts and would like to "chown" files between them. Currently, I must handle such requests manually, and this is inconvenient.

I am looking for a way to allow non-root users to chown files with authentication (i.e. prompt for the password of the user to which ownership is being set to). This would prevent an exploit such as:

Quote:
cp /bin/bash ~/sudobash
chmod 4777 ~/sudobash
chown root:root ~/sudobash

Does such a solution exist?

View 2 Replies View Related

Ubuntu :: Chown On SD Card - Operation Not Permitted?

Dec 16, 2010

I am trying to modify the user and group for a directory on my SD card, but I get an "Operation not permitted" error even when I'm signed in as root. I have the SD card auto mounted using:

Code:
root@ubuntu:/media# cat /etc/fstab
/dev/mmcblk0p1 /media/sd vfat auto,user,dmask=0000,fmask=0111 0 0

View 5 Replies View Related

Ubuntu :: Lock Symbol Won't Go Away, Even After 'chown' Exec?

Jan 27, 2011

I did the chown task, as root, and the file icon still has the lock symbol on it. I did it on another file on my desktop just before that, and the symbol went away.I checked 'Properties', and it shows me as owner.It's an ISO on my desktop, copied from LXF Magazine DVD.

View 1 Replies View Related

Ubuntu :: Use Sudoers To Allow Any User To Chown A Certain Set Of Files?

Feb 16, 2011

I have a fairly complicated request The short version is, I want to set up a system so that any user can change the ownership of a certain set of files at any time without root access. I think it's possible to set up sudoers to do that, but so far I have failed miserably.I have tried setting up a wrapper script around chown, then putting that script into sudoers, but it didn't work. Here's the script and sudoers (paths changed to genericize them):

Code:
#!/bin/bash
#this script moves a copy of the code

[code]....

View 4 Replies View Related

Ubuntu :: MD5 Checking On Chown - Computers Have Different Checksums

Jun 29, 2011

I downloaded GNU coreutils and compiled them both identically on two different computers running Ubuntu 10.04.1 LTS. I performed a random audit, MD5 checking on chown, and they both have different checksums. Does anyone know why this has occurred?

View 6 Replies View Related

OpenSUSE :: Can't Chown Windows In 11.1

Feb 6, 2010

I've got a bit of an issue here. I'm running OpenSUSE 11.1 with an old Windows XP drive slaved on the secondary cable. Works just find, as long as I sudo mount it (sudo mount /dev/sdb1 /windows/C) and I can access everything I have on the drive; this is not the issue. The issue is that I have another drive that I want to sync up. Eh, this needs to be a bit clearer.

When I have /windows/C mounted, it shows a padlock on the C drive, but not windows folder. (/windows/C). I have a dedicated entry in / to allow windows to work. I have maybe 25 folders in my Music folder that I want to sync to my /C drive, as I plan to re-install Suse on a bigger drive, and don't want to lose this music.

Upon su *password* into root, I can ls -l and I get
Code:
ls -l
total 32
drwxr-xr-x 26 root root 32768 1969-12-31 17:00 C

[Code].....

The reason I want to get this stuff transfered over is because I'm running out of room on my smaller drive and I figure I may as well utilize a 200GB HDD for something besides a paperweight. I know this drive will work, but I don't want to lose my current data that exists on my smaller drive. (I think my current drive is a 40? Not completely sure right now)

View 3 Replies View Related

General :: How To Use Chown Command

Jan 12, 2010

My home/container has me as the owner but the contents all belong to root...I've tried >chown cbjhawks /home/cbjhawks but that didn't change anything. Should it be >chown -R cbjhawks /home/cbjhawks? Or what is the proper command for doing this...

View 2 Replies View Related

Ubuntu :: Chown Not Working On External NTFS Drive

Feb 27, 2010

I have an external drive which is parted into two partitions:

1) ext4, with filesystem ext4 which I use for backup

2) NTFS with filesystem NTFS

Since I re-installed jaunty the NTFS partition is owned by root. Whatever I do to make it change, it doesn't work. I used:

sudo chown jan:jan NTFS
sudo chown -R jan:jan NTFS

Still it says the owner is root and also the group is root. What else do I need to do to make me owner of this partition? The fileproperties say: drwxrwxrwx Still the partition is read only for me. In ntfs-config it says: "Enable write support for external drive"

View 1 Replies View Related

Ubuntu Servers :: Chown Recursion On Home Directories?

Apr 26, 2011

I have a perplexing problem that I was hoping some of you might help me solve. My servers run 10.10 and also serve as standalone LTSP hosts - none of this is terribly relevant I hope. Recently, a user complained of permission problems and so I ran a simple command:

Code:
chown -R username:username /home/username/*
and

[code]...

View 4 Replies View Related

General :: Why Are 'chown' And 'chgrp' Not Working

Feb 12, 2011

I've just installed Ubuntu 10.10 AMD-64 and mounted several partitions into /mnt/ directory. Now I want to be able to perform operations on those partitions without limitations. I'm trying to change the owner and group but it doesn't work. I'm typing sudo chown username filename to perform the operations.

View 1 Replies View Related

General :: CHOWN All Folders Within A Folder?

Feb 9, 2011

I would like to change the ownership of some all folders and files within them folders by making changes to parentfolder. But I mess it up.

The folder path is /home/myaccount/shared/target_folder.

Target folder holds several new folders with files inside. How can I easily change ownership to all folders and files within target_folder?

I tried this:
Code: sudo chown myusername /home/myusername/shared/target_folder But I get error:

Unnable to resolve. No such file or directory.

View 5 Replies View Related

General :: Include The Subdirectories In A Chown?

Jul 19, 2010

When I installed a new copy of my distro on another partition, in order to preserve all the settings from my old my user account, I made a user account with the same name on the new installation, and then copied my old user account's files (in their entirety) to the new user account, overwriting it. I did the copying from the root account (where else? I assume the new user account can't overwrite itself while it's open), and root became the owner of everything I copied, making it impossible to open the new user account. So I then chowned the new user account's folder to myself. I still can't get in, because apparently, chown only chowned the top folder, leaving all subdirectories owned by root. How do I make chown include all subdirectories? I scanned the man page, but didn't see a parameter.

View 4 Replies View Related

Server :: How To Www-data Chown A File

Jun 11, 2010

I have a php script that creats some files and moves them into certain directories. When the files are created, the ownership is www-data:www-dataWhen they are moved to the appropriate directories the maintain that. But, I need the files' ownership to be changed to asterisk:asteriskHowever, www-data doesn't have permissions to do this. I don't want to run a cron as root that does this (I'm already doing that). I really wish there was a way for my files to be created via my php script and in that same file do something like:
system("chown asterisk:asterisk /home/test/test.call");

View 7 Replies View Related

Server :: Kernel & Chown The Second Drive

Mar 21, 2010

i have problem to chown the seconde drive, i dont know how can mount it,

[Code]....

and the server has 16 gb ram and after i install openvz i can see only 3 gb ram, server working on centos 5. 32bit

View 6 Replies View Related







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