microsoft / hdfs-mount

A tool to mount HDFS as a local Linux file system
Other
286 stars 64 forks source link

hdfs-mount/FileHandleWriter.go expects /var/ to be writable. #38

Open gwlperl opened 6 years ago

gwlperl commented 6 years ago

Please consider the TODO below.

/var is only ever going to be writable by root, except in very insecure environments. If this was trying to make something like /var/hadoop/hdfs-mount then we could deal with it by creating the "/var/hadoop" directory and making it writable by the user we are building as. As it is, it'll only work in a docker container.

hdfs-mount/FileHandleWriter.go

37      stageDir := "/var/hdfs-mount" // TODO: make configurable
38      if ok := os.MkdirAll(stageDir, 0700); ok != nil {
39          Error.Println("Failed to create stageDir /var/hdfs-mount, Error:", ok)
40          return nil, ok
41      }