Chown error in Solaris

Hello All,

I am trying to change the home directory ownership of a user from "skel" to user himself,

drwxr-xr-x   4 skel aldo      4096 May 26 09:47 dosatc

But when i do that i get an error stating,

# chown -R dosatc /msdhome/dosatc
#chown: getcwd: Too many open files

Please guide me on how can i rectify the issue

Either increase open files limit for user or use find / exec to do it each file/directory one at the time.

Hope that helps
Best regards
Peasant.

Hello Peasant,

Thanks for the reply. Sorry i am a newbie, can you please help me on commads how it can be done please?

The error you are seeing can be caused by a couple of things:

  1. The file table in the kernel of your operating system is full. This happens because a lot of users have a lot of open files and the kernel wasn't configured to allow more open files than what are already open in all of the processes that are currently running on your system.
  2. You personally have more open files in processes that you are running than are allowed by your system administrator for an individual (non-privileged) user. This can frequently happen to newbies who first find out that they can run lots of background jobs and forget that running jobs in the background consumes system resources.

Since you do not have root privileges, you cannot fix the 1st problem. If this is your problem, you need to let your system administrator know that you can't run jobs because the file table is full and ask her/him to get rid of some of the offending file hogs or reconfigure the system to have a larger file table. (Note that this only applies to older systems; more recent system usually grow the file table as needed.)

If you can successfully run the command:

ps -u login_name

where login_name is the name you use when you login to your system, that will give you a list of all of the processes that are running with your user-ID. If there are lots of (possibly long-running) background jobs there that you didn't realize were still running, either wait for those jobs to complete or kill them off on your own.

But, of course, if the file table is full (problem #1 above) and there are running processes trying to open more files, the ps command may fail as it tries to open directories to find ps , to open the password data base to find your login name, etc.