0

I am trying to copy a file from one folder to another on a mounted folder. I see the following error. Note that this is on mounted NFS folder not on HDFS.The error is coming up from the line of code that does a create() of the destination file. The "No such file" error is not on the source.

java.io.IOException: Cannot run program "chmod": error=2, No such file or direct                                                                                                                     ory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1059)
        at org.apache.hadoop.util.Shell.runCommand(Shell.java:938)
        at org.apache.hadoop.util.Shell.run(Shell.java:901)
        at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:                                                                                                                     1213)
        at org.apache.hadoop.util.Shell.execCommand(Shell.java:1307)
        at org.apache.hadoop.util.Shell.execCommand(Shell.java:1289)
        at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSys                                                                                                                     tem.java:840)
        at org.apache.hadoop.fs.RawLocalFileSystem.mkOneDirWithMode(RawLocalFile                                                                                                                     System.java:522)
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirsWithOptionalPermission(                                                                                                                     RawLocalFileSystem.java:562)
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.jav                                                                                                                     a:534)
        at org.apache.hadoop.fs.ChecksumFileSystem.mkdirs(ChecksumFileSystem.jav                                                                                                                     a:705)
        at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.jav                                                                                                                     a:456)
        at org.apache.hadoop.fs.ChecksumFileSystem.create(ChecksumFileSystem.jav                                                                                                                     a:443)
        at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:1118)
        at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:1098)
        at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:987)
        at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:975)
Rishi S
  • 353
  • 1
  • 5
  • 16
  • Why would you call a shell program to change mode bits? https://stackoverflow.com/a/664443/1216776 – stark Aug 11 '20 at 18:18

1 Answers1

0

The issue got resolved after setting the PATH variable to chmod.

Rishi S
  • 353
  • 1
  • 5
  • 16
  • Hi, I am having the same problem. what do you mean by setting PATH variable to chmod ? – igx Nov 14 '21 at 11:31