Sponsored Content
Top Forums Programming chmod:No such file or directory Post 302346054 by mansa on Friday 21st of August 2009 12:33:47 AM
Old 08-21-2009
chmod:No such file or directory

Code:
  sprintf(fname, "core.%d", pid);
  (void) unlink(fname);
  if (ttrace(TT_PROC_CORE, pid, 0, 0, 0, 0) != 0) {
    perror("TT_PROC_CORE pass");
    Fail();
  }
  if (chmod(fname, 0) != 0) {
    perror("chmod");
    Fail();
  }

Hi,

If i execute above code,everytime am getting below error..


===============
STANDARD OUTPUT:
FAIL
STANDARD ERROR:
chmod: No such file or directory
===============


Could you please let me know how to overcome that issue..
Is there anything wrong in the code..

Thanks in Advance,
Mansa
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

directory permissions and CHMOD

I am working on a new UNIX box that has been delivered to us, and noticed that the /home directory has 555 permissions on it (dr-xr-xr-x). Any attempt to create write permissions fails on this directory (such as chmod 777), responding only with a message; chmod: WARNING: can't change home ... (3 Replies)
Discussion started by: ncarmstrong
3 Replies

2. UNIX for Dummies Questions & Answers

what to chmod to write in a directory?

i am unable to write to some .php files in the following directory: drwxr-xr-x 3 headroom max 448 Jun 6 2004 Docs i already tried this: chmod +777 Docs chmod: changing permissions of `Docs': Operation not permitted thanks for your help! (2 Replies)
Discussion started by: phonedog365
2 Replies

3. UNIX for Dummies Questions & Answers

chmod erased a directory(?)

I was attempting to change permissions on a directory, used a 'chmod -rwrwrw DirectoryName' command, and hit enter. Now, that directory shows that it's empty! How could this be? Any Ideas? Thanks (1 Reply)
Discussion started by: SmooBG
1 Replies

4. Shell Programming and Scripting

use a file to chmod

Hi! I need help becouse I've server to backup and I've a lot of files with 700 permission and I need to change the mode to 755 before copy So the point is. With find . -perm 700 -exec echo {} > textfile.txt \; I got a text file with 3156 line which one... (3 Replies)
Discussion started by: ruben.rodrigues
3 Replies

5. Solaris

Unable to chmod a file/directory

This is Solaris 10, by the way. I am aware of ACLs or something like that in Solaris 10 where you can change who can access directories and such that goes beyond the standard permisisons (chmod and rwxrwxrwx). Although I thought when these were being used, the permissions listing would show a... (12 Replies)
Discussion started by: lyonsd
12 Replies

6. UNIX for Dummies Questions & Answers

chmod of remote file

I would like to chmod the file which I am pulling from remote server onto my server. I am using the following script: sftp <server detail> get abc xyz chmod 666 xyz bye Though I could fetch the file successfully but I am not able to change the permission of xyz file on my server. umask... (1 Reply)
Discussion started by: kdtrica
1 Replies

7. Shell Programming and Scripting

File permission by chmod

Hi, I have a typical problem. Consider the scenario: Folder1 ------> Folder2 ------> File1 ------> Folder3 Above is my folder structure, currently the user group "other" has no permissions. I wish to give "read" permission for "others" to File1 using a single command. chmod -R... (5 Replies)
Discussion started by: animesh303
5 Replies

8. UNIX and Linux Applications

What is the difference between chmod in solaris and chmod in Linux?

i think it is the same in both... Iam i right? (1 Reply)
Discussion started by: sumaiya
1 Replies

9. Red Hat

chmod only immediate directory?

I am having trouble figuring out how to do a "chmod o-w" for all files under a certain directory, while excluding directories under that certain directory. I can do chmod -R o-w /thisdirectory but that changes permissions of all directories under the directory as well as files. I just... (2 Replies)
Discussion started by: austinharris43
2 Replies

10. Shell Programming and Scripting

excluding a directory with chown, chmod

does anyone know how to exclude a directory with chown or chmod? im trying to do something like this chown $username:$username $directory/* chown $username:$username $directory/.* chown $username:$username $directory and find $directory/* -type f -exec... (1 Reply)
Discussion started by: vanessafan99
1 Replies
clm residue(1)							  USER COMMANDS 						    clm residue(1)

  NAME
      clm residue - extend clustering of subgraph to clustering of graph.

      clmresidue  is  not  in  actual fact a program. This manual page documents the behaviour and options of the clm program when invoked in mode
      residue. The options -h, --apropos, --version, -set, --nop are accessible in all clm modes. They are described in the clm manual page.

  SYNOPSIS
      clm residue -icl fname (input clustering) -imx fname (input graph) [-rpm fname (residue projection matrix)]  [-o	fname  (output	clustering
      file)]

  DESCRIPTION
      The cluster file presumably contains a clustering of a subgraph of the graph G contained by the matrix file, implying that the row domain of
      that clustering is a subset of the node domain of the graph. clm residue will compute  a	simple	upwards  projection  of  that  clustering,
      resulting in a clustering of G.

  OPTIONS
      -imx fname (input graph)

      -icl fname (input clustering)

      -rpm fname (residue projection matrix)
	The name for the file in which the residue projection matrix is stored.  It contains for each node and for each cluster in the input clus-
	tering the combined weight of the (edges to the) neighbours of that node in that cluster.  The default output file name is out.rpm.

      -o fname (output clustering file)
	The name for the file in which the majority vote projection clustering is stored. Aka the majority vote projection clustering storage file
	name.

	This  embodies	a very crude approach to distributing the missing nodes in the input clustering onto that same cluster. For each node, the
	cluster is taken for which the residue projection is the largest (see above). The residue (i.e. the set of  missing  nodes)  is  initially
	viewed	as  a  cluster;  the set of nodes for which the projection is largest for the residue itself will form a new cluster, if it is not
	empty.

	By default output is sent to STDOUT.

  AUTHOR
      Stijn van Dongen.

  SEE ALSO
      mclfamily(7) for an overview of all the documentation and the utilities in the mcl family.

  clm residue 12-068						      8 Mar 2012						      clm residue(1)
All times are GMT -4. The time now is 03:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy