Sponsored Content
Full Discussion: Perms for Unix user
Top Forums UNIX for Dummies Questions & Answers Perms for Unix user Post 302593861 by methyl on Sunday 29th of January 2012 03:15:18 PM
Old 01-29-2012
Quote:
chown-R myuser / home / myuser
I'm a bit concerned about the accuracy of your typing and the presence of space characters in the directory name "/home/myuser". If you type this command (with "chown -R" typed accurately with a space character) while logged in as "root" this would be a catastrophe because it would try to change the ownership from the root directory "/" down, then a directory called "home", then root "/" again , then a directory called "myuser". In my experience the system becomes a write-off before the command finishes.

Personally I would never issue a "chown -R" command ever.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

selective tar image and dir perms

Hi, I'm creating a tar image containing selected files held in a manifest file thus: cat <manifest file> | xargs tar -cvpf tar.out I need to preserve the directory as well as the file perms. When my list contains no separate directory lines, the directory is created implicitly when the... (4 Replies)
Discussion started by: gfarley
4 Replies

2. UNIX for Dummies Questions & Answers

New UNIX user

Hello., I am relatively new to UNIX and to this forum, (I have trolled a while...) so I have a few questions. A family member works for Network Appliance, and I get old machines from liquidation, etc. He has been pushing for me to learn UNIX for quite some time. Recently I have taken his... (1 Reply)
Discussion started by: Dana919
1 Replies

3. UNIX for Dummies Questions & Answers

New Unix User

I'm trying to learn something new.....I have taken college courses for C and I was looking at my Cellphone and I found a Unix based program that I can use from my phone...pretty nice...but I don't even know how to use Unix at all and want to learn how....so can anyone recommend any good books or... (1 Reply)
Discussion started by: Jodadi
1 Replies

4. Shell Programming and Scripting

How to allow unix regular user to disable a unix printer

HI, I'm trying to create a script that a regular unix user can run from a unix menu and disable and enable a unix printer. Any help will be very helpful. Thanks (0 Replies)
Discussion started by: miguelpza
0 Replies

5. Slackware

CUPS setup / dev/lp0 perms. ... Slow printing.

Hello, Ive got an HP LaserJet 2100 / parallel interface. I had some troubles getting going due to non-working cups drivers. Updated cups and also used a .ppd.gz file from something HP provided. found the files here... www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_2100 Anyways.... (1 Reply)
Discussion started by: agentrnge
1 Replies

6. Programming

Determining file access perms for current process

Stupid question, but is there an ANSI C stdlib function that will do this for me? I want to pass the function a path and determine if the current process can read/write/execute on the path. I suppose I can whip something up using fstat and then determining the current process's user/group IDs and... (6 Replies)
Discussion started by: DreamWarrior
6 Replies

7. Fedora

New UNIX user

I've acquired a job that uses UNIX as well as Windows 7. I've picked up on things rather quickly at work, but want to learn more at home. At work they have a shell that runs in windows. Is there some place I can download UNIX to run in Windows 7 in order to practice more at home? Any info... (4 Replies)
Discussion started by: rwolford
4 Replies

8. Programming

how to user get unix variable USER in C

in a C program, how do you access the unix environment variable USER for example? (1 Reply)
Discussion started by: omega666
1 Replies

9. Solaris

NFS server RW perms

Hi I can't write to fs "/share/nfs" shared by nfs server despite properly setting RW permissions. NFS server is configured on CentOS and Solaris10 is client. CentOS NFS Server config : -------------------------------- Entries in /etc/exports file : # cat /etc/exports /inst ... (6 Replies)
Discussion started by: presul
6 Replies

10. Shell Programming and Scripting

Using find for variable combination of perms

Hi, I'm trying to use find in kshell (AIX) to find all files with perms of write for other AND any execute bit set. e.g: r--r-x-w- would qualify and rw-rw--wx would qualify but ---rwxr-xr-x wouldn't qualify So far, I've been trying something like this: find . -type f -perm... (4 Replies)
Discussion started by: alanp36
4 Replies
explain_chown_or_die(3) 				     Library Functions Manual					   explain_chown_or_die(3)

NAME
explain_chown_or_die - change ownership of a file and report errors SYNOPSIS
#include <libexplain/chown.h> void explain_chown_or_die(const char *pathname, int owner, int group); DESCRIPTION
The explain_chown_or_die function is used to call the chown(2) system call. On failure an explanation will be printed to stderr, obtained from explain_chown(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: explain_chown_or_die(pathname, owner, group); pathname The pathname, exactly as to be passed to the chown(2) system call. owner The owner, exactly as to be passed to the chown(2) system call. group The group, exactly as to be passed to the chown(2) system call. Returns: This function only returns on success. On failure, prints an explanation and exits. SEE ALSO
chown(2) change ownership of a file explain_chown(3) explain chown(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_chown_or_die(3)
All times are GMT -4. The time now is 05:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy