0
$\begingroup$

Rosanswers logo

Hi guys,

I have just made a fresh installation of ROS2 Galactic following the guide in the documentation. I need to use galactic for the time being because of other dependencies in a project.

If I try to run basic ros2 commands like:

ros2 topic list

or

ros2 node list

I get the following error message:

Failed opening file /home/martin/.ros/log/python3_87631_1672396098403.log for writing: Permission denied

It seems that ros does not have permission to create a new file in the .ros/log/ folder.

Have anyone experienced something similar, or know a fix?

Thanks!

System info

Linux 5.15.0-56-generic

Ubuntu 20.04.5 LTS

gcc 9.4.0

ROS_VERSION=2

ROS_PYTHON_VERSION=3

ROS_LOCALHOST_ONLY=0

ROS_DISTRO=galactic


Originally posted by MasHyke on ROS Answers with karma: 23 on 2022-12-30

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Did you source the ROS2 in the terminal before these commands? Did you use sudo with some of the ROS commands during the installation or installing dependencies? Perhaps you did this (from rosdep -h):

rosdep fix-permissions Recursively change the permissions of the user's ros home directory. May require sudo. Can be useful to fix permissions after calling rosdep update with sudo accidentally.

Please check it in your workspace (sudo rosdep fix-permissions). Can you check your user groups (groups) and show them?

Some related Q&A to check:


Originally posted by ljaniec with karma: 3064 on 2022-12-30

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.