Sponsored Content
Operating Systems Solaris Changing file/directory owner Post 302631383 by Twirlip on Friday 27th of April 2012 09:17:46 AM
Old 04-27-2012
When using "find -user" and "chown", you have to beware of symlinks. The find will find symlinks owned by that user, but chown will change the ownership of the file pointed to, not the symlink itself. When fixing up file ownerships like this, it's better to use chown -h
Code:
find . -user 23136 -exec chown -h dsadm {} \;

This User Gave Thanks to Twirlip For This Post:
 

10 More Discussions You Might Find Interesting

1. OS X (Apple)

Problem changing owner of symbolic links?

Strangely, chown and chmod don't seem to work on symlinks. In particular, I tried this (as root): # touch foo # ln -s foo mysymlink # chown SOMEUSER mysymlink as well as changing the last line to: # chown -h someuser mysymlink where "-h" is supposed to change the UID of the actualy... (1 Reply)
Discussion started by: noahcowan
1 Replies

2. UNIX for Advanced & Expert Users

Changing the process owner

How do I change the owner of the process in runtime.I'm working AIX. I would appreciate ,If I get sample scripts. (1 Reply)
Discussion started by: kkb_karthi
1 Replies

3. UNIX for Advanced & Expert Users

changing owner & grp of a file

Hi, I have a file in my system as below My user and grp id is sns / sns -rwxrwxrwx 1 sns sns 6012357 Sep 27 06:01 sample Is there a way to change the owner and grp of this file to app / app ... ie. as given below -rwxrwxrwx 1 app app 6012357 Sep 27 06:01 sample I guessed... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

4. Solaris

Changing owner

Hi, I own a file, when i try to change the owner of my file to other user it is throwing error like chown: changing ownership of `a.txt': Not owner my OS is sunOS 5.8 Thanks. (1 Reply)
Discussion started by: shahnazurs
1 Replies

5. UNIX for Dummies Questions & Answers

Changing owner???

How to change the owner of a file. example: suppose original owner is A and we want to change to B Please provide the syntax Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies

6. Solaris

Owner of file gets 'not owner' error for chgrp

Hi Folks, I know that changing users and groups is pretty basic admin, but this one has got me stumped. When I try to change the group of a file for which I am the owner for, it still gives me a 'Not owner' error. For example, when I am logged in as 'webadmin', I have the following file: ... (4 Replies)
Discussion started by: brizrobbo
4 Replies

7. UNIX for Dummies Questions & Answers

How to display only Owner and directory/sub directory names under particular root

hai, I am new to Unix, I have a requirement to display owner name , directory or sub directory name, who's owner name is not equal to "oasitqtc". (here "oasitqtc" is the owner of the directory or sub directory.) i have a command (below) which will display all folders and sub folders, but i... (6 Replies)
Discussion started by: gagan4599
6 Replies

8. OS X (Apple)

Logic of owner of directory or file

Would the owner as listed , be the one who made the directory in the first place. when any one could use chown in a script. I do not know where this directory came form or who made it. And am attempting to just find out more info on it. what could i use to find its origins and its why does it... (3 Replies)
Discussion started by: cowLips
3 Replies

9. Solaris

Privileges : modify dir/file owner by other that's not owner

i need to do the following operations in solaris 10: 1.change owner and group owner for files which are not owned by the current user and user group 2.to can delete files in the /tmp directory which are not of the current user 3. allow to a standard user the deletion of files in the /tmp... (1 Reply)
Discussion started by: sirmark
1 Replies

10. AIX

How to set owner and permission for files/directory in directory in this case?

Hi. My example: I have a filesystem /log. Everyday, log files are copied to /log. I'd like to set owner and permission for files and directories in /log like that chown -R log_adm /log/* chmod -R 544 /log/*It's OK, but just at that time. When a new log file or new directory is created in /log,... (8 Replies)
Discussion started by: bobochacha29
8 Replies
XSetSelectionOwner()													      XSetSelectionOwner()

Name
  XSetSelectionOwner - set the owner of a selection.

Synopsis
  XSetSelectionOwner(display, selection, owner, time)
	Display *display;
	Atom selection;
	Window owner;
	Time time;

Arguments
  display   Specifies a connection to an X server; returned from XOpenDisplay().

  selection Specifies the selection atom.  Predefined atoms are XA_PRIMARY and XA_SECONDARY.

  owner     Specifies the desired owner of the specified selection atom.  This value is either a window ID or None.

  time	    Specifies  the  time  when	the selection should take place.  Pass either a timestamp, expressed in milliseconds, or the constant
	    CurrentTime.

Description
  XSetSelectionOwner() sets the owner and last-change time of a selection property.  This should be called by an  application  that  supports
  cutting and pasting between windows (or at least cutting), when the user has made a selection of any kind of text, graphics, or data.  This
  makes the information available so that other applications can request the data from the new	selection  owner  using  XConvertSelection(),
  which generates a SelectionRequest event specifying the desired type and format of the data.	Then the selection owner sends a SelectionNo-
  tify using XSendEvent(), which notes that the information is stored in the selection property in the desired format or  indicates  that  it
  couldn't do the conversion to the desired type.

  If  owner  is specified as None, then this client is giving up ownership voluntarily.  Otherwise, the new owner is the client executing the
  request.

  If the new selection owner is not the same client as the old owner, and the new owner is a window, then the old owner is sent a  Selection-
  Clear event.	This indicates to the old owner that the selection should be unhighlighted.

  If the selection owner window is later destroyed, the owner of the selection automatically reverts to None.

  The value you pass to the time argument must be no earlier than the last-change time of the specified selection, and no later than the cur-
  rent time, or the selection is not affected.	The new last-change time recorded is the specified time, with  CurrentTime  replaced  by  the
  current server time.	If the X server reverts a selection owner to None, the last-change time is not affected.

  For more information on selections, see Volume One, Chapter 12, Interclient Communication.

Errors
  BadAtom
  BadWindow

See Also
  XConvertSelection(), XGetSelectionOwner().

Xlib - Selections													      XSetSelectionOwner()
All times are GMT -4. The time now is 11:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy