Description
Due to an issue with directory and file permissions, users will encounter a Permission denied error when running Nios® II SBT Eclipse (eclipse-nios2 command) from the Nios II Command Shell .
Resolution
To allow other users to access Nios® II SBT Eclipse run the following commands to set the correct permissions before installing Eclipse Nios® II plugins:
- export CWD=/nios2eds/bin #setting an environment variable $cwd for the current working directory
- mkdir $CWD/temp_dir #creating a temporary directory for changing file permissions
- tar xf $CWD/eclipse_nios2_plugins.tar.gz -C $CWD/temp_dir #un-archive to the temporary directory
- chmod g rwx,o rx $(find $CWD/temp_dir/eclipse_nios2 -type d) #updating correct permission bits for directories
- chmod g rw,o r $(find $CWD/temp_dir/eclipse_nios2 -type f) #updating correct permission bits for files
- cp -rpf $CWD/temp_dir/eclipse_nios2 $CWD #overwrite with the updated eclipse_nios2 folder
- rm -rf $CWD/temp_dir #remove temporary directory
- unset CWD #un-setting the environment variable