GNS3 / gns3-server

GNS3 server
GNU General Public License v3.0
798 stars 263 forks source link

Issues exporting project containing Docker containers #1757

Closed grossmj closed 3 days ago

grossmj commented 4 years ago

https://gns3.com/community/discussion/problem-duplicating-or-exporting

Could not export file /home/gns3/GNS3/projects/37ac7fd1-fd10-4baf-8aea-317e086e2844/project-files/docker/7245294b-bbb9-4e6e-b2c9-7f90295029f6/dev/tty6: [Errno 13] Permission denied: '/home/gns3/GNS3/projects/37ac7fd1-fd10-4baf-8aea-317e086e2844/project-files/docker/7245294b-bbb9-4e6e-b2c9-7f90295029f6/dev/tty6'

Could not export file /home/gns3/GNS3/projects/37ac7fd1-fd10-4baf-8aea-317e086e2844/project-files/docker/7245294b-bbb9-4e6e-b2c9-7f90295029f6/dev/ttyS1: [Errno 13] Permission denied: '/home/gns3/GNS3/projects/37ac7fd1-fd10-4baf-8aea-317e086e2844/project-files/docker/7245294b-bbb9-4e6e-b2c9-7f90295029f6/dev/ttyS1'

....

Could not export file /home/gns3/GNS3/projects/37ac7fd1-fd10-4baf-8aea-317e086e2844/project-files/docker/7245294b-bbb9-4e6e-b2c9-7f90295029f6/proc/sys/vm/stat_refresh: [Errno 13] Permission denied: '/home/gns3/GNS3/projects/37ac7fd1-fd10-4baf-8aea-317e086e2844/project-files/docker/7245294b-bbb9-4e6e-b2c9-7f90295029f6/proc/sys/vm/stat_refresh'

Could not export file /home/gns3/GNS3/projects/37ac7fd1-fd10-4baf-8aea-317e086e2844/project-files/docker/7245294b-bbb9-4e6e-b2c9-7f90295029f6/proc/sys/vm/mmap_rnd_compat_bits: [Errno 13] Permission denied: '/home/gns3/GNS3/projects/37ac7fd1-fd10-4baf-8aea-317e086e2844/project-files/docker/7245294b-bbb9-4e6e-b2c9-7f90295029f6/proc/sys/vm/mmap_rnd_compat_bits'
grossmj commented 4 years ago

I cannot reproduce the problem.

ghost commented 4 years ago

Oh, I can reproduce it. I just reproduced it 3 hours ago.

Now you have to understand that the way permissions work in Linux is foreign to native Windows users. Let me grab the full log:

(Okay, the heads up here is that I moved the entire contents of one directory (~/GNS3/projects/nat-cloud-combo) to another directory ( ~/GNS3/projects/personal/dhcp-snooping/IOSvL2-15.2.1 and I successfully moved the files,

But the .gns3 file showed up as me not being able to write to it. ( I wanted to change the name of the titlebar from nat-cloud-combo to dhcp-snooping-iosvl2-15.2.1 in the windows gui in the .gns3 file ) But I did know I did not have permission to write to the file when I began editing it in vim.

I have looked at the log again. It is 522 lines long and it is very confusing. I used the mv command to move the files from nat-cloud-combo to IOSvL2-15.2.1, but I broke the .gns3 file in IOSvL2-15.2.1 so I had to destroy the IOSvL2 directory and all it's directory.

I fixed it my problem. But I really do not understand what I did.

I am not deleting any lines in my logs - I just do not do that.

This is Ubuntu 18.04 and there is some thing about mv and cp that may, or may not, be affecting GNS3.

Again, no lines are deleted. Sorry.

x@y:~/GNS3/projects/nat-cloud-combo$ mv * /home/x/GNS3/projects/personal/dhcp-snooping/IOSvL2-15.2.1
x@y:~/GNS3/projects/nat-cloud-combo$ ls -al
total 8
drwxrwxr-x  2 x x 4096 Jul 21 02:49 .
drwxr-xr-x 12 x x 4096 Jul 21 02:38 ..
x@y:~/GNS3/projects/nat-cloud-combo$ pwd
/home/x/GNS3/projects/nat-cloud-combo
x@y:~/GNS3/projects/nat-cloud-combo$ cd /home/x/GNS3/projects/personal/dhcp-snooping/IOSvL2-15.2.1
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ cp -r * /home/x/GNS3/projects/nat-cloud-combo
cp: cannot open 'project-files/docker/49f44a39-556f-492b-b7e2-3671912813af/var/log/btmp' for reading: Permission denied
cp: cannot open 'project-files/docker/49f44a39-556f-492b-b7e2-3671912813af/var/log/tallylog' for reading: Permission denied
cp: cannot access 'project-files/docker/49f44a39-556f-492b-b7e2-3671912813af/root': Permission denied
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ sudo chown -R x:x /home/x/GNS3/projects/personal/dhcp-snooping
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ cp -r * /home/x/GNS3/projects/nat-cloud-combo
cp: cannot create regular file '/home/x/GNS3/projects/nat-cloud-combo/project-files/docker/74ff2b66-386c-4284-b461-5971d4620d40/etc/apt/apt.conf.d/01autoremove-kernels': Permission denied
cp: cannot create regular file '/home/x/GNS3/projects/nat-cloud-combo/project-files/docker/f8d0d318-a12b-416d-8fe8-364ea93c6558/etc/apt/apt.conf.d/01autoremove-kernels': Permission denied
cp: cannot create regular file '/home/x/GNS3/projects/nat-cloud-combo/project-files/docker/c2cf43ed-76d5-4224-af74-8c99d7e79a66/etc/apt/apt.conf.d/01autoremove-kernels': Permission denied
cp: cannot create regular file '/home/x/GNS3/projects/nat-cloud-combo/project-files/docker/49f44a39-556f-492b-b7e2-3671912813af/etc/apt/apt.conf.d/01autoremove-kernels': Permission denied
cp: cannot create regular file '/home/x/GNS3/projects/nat-cloud-combo/project-files/docker/7db6c2d9-255d-4f6f-87c7-36b49545400e/etc/apt/apt.conf.d/01autoremove-kernels': Permission denied
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ cd /home/x/GNS3/projects/nat-cloud-combo/project-files/docker
x@y:~/.../nat-cloud-combo/project-files/docker$ ls -al
total 28
drwxr-xr-x 7 x x 4096 Jul 21 02:50 .
drwxr-xr-x 9 x x 4096 Jul 21 02:50 ..
drwxr-xr-x 6 x x 4096 Jul 21 02:50 49f44a39-556f-492b-b7e2-3671912813af
drwxr-xr-x 6 x x 4096 Jul 21 02:50 74ff2b66-386c-4284-b461-5971d4620d40
drwxr-xr-x 6 x x 4096 Jul 21 02:50 7db6c2d9-255d-4f6f-87c7-36b49545400e
drwxr-xr-x 6 x x 4096 Jul 21 02:50 c2cf43ed-76d5-4224-af74-8c99d7e79a66
drwxr-xr-x 6 x x 4096 Jul 21 02:50 f8d0d318-a12b-416d-8fe8-364ea93c6558
x@y:~/.../nat-cloud-combo/project-files/docker$ cd 49f44a39-556f-492b-b7e2-3671912813af
x@y:~/.../project-files/docker/49f44a39-556f-492b-b7e2-3671912813af$ ls -al
total 24
drwxr-xr-x  6 x x 4096 Jul 21 02:50 .
drwxr-xr-x  7 x x 4096 Jul 21 02:50 ..
drwxr-xr-x 47 x x 4096 Jul 21 02:51 etc
drwx------  2 x x 4096 Jul 21 02:51 root
drwxr-xr-x  2 x x 4096 Jul 21 02:50 tftpboot
drwxr-xr-x  4 x x 4096 Jul 21 02:50 var
x@y:~/.../project-files/docker/49f44a39-556f-492b-b7e2-3671912813af$ cd etc
x@y:~/.../docker/49f44a39-556f-492b-b7e2-3671912813af/etc$ ls -al
total 460
drwxr-xr-x 47 x x  4096 Jul 21 02:51 .
drwxr-xr-x  6 x x  4096 Jul 21 02:50 ..
-rw-r--r--  1 x x  3028 Jul 21 02:51 adduser.conf
drwxr-xr-x  2 x x  4096 Jul 21 02:51 alternatives
drwxr-xr-x  6 x x  4096 Jul 21 02:50 apparmor.d
drwxr-xr-x  7 x x  4096 Jul 21 02:50 apt
-rw-r--r--  1 x x  2319 Jul 21 02:51 bash.bashrc
-rw-r--r--  1 x x   367 Jul 21 02:51 bindresvport.blacklist
drwxr-xr-x  2 x x  4096 Jul 21 02:50 cron.daily
-rw-r--r--  1 x x  2969 Jul 21 02:51 debconf.conf
-rw-r--r--  1 x x    11 Jul 21 02:51 debian_version
drwxr-xr-x  2 x x  4096 Jul 21 02:50 default
-rw-r--r--  1 x x   604 Jul 21 02:51 deluser.conf
drwxr-xr-x  3 x x  4096 Jul 21 02:50 dhcp
drwxr-xr-x  4 x x  4096 Jul 21 02:50 dpkg
-rw-r--r--  1 x x    96 Jul 21 02:51 environment
drwxr-xr-x  4 x x  4096 Jul 21 02:50 fonts
-rw-r--r--  1 x x    37 Jul 21 02:51 fstab
-rw-r--r--  1 x x   132 Jul 21 02:51 ftpusers
-rw-r--r--  1 x x  2584 Jul 21 02:51 gai.conf
-rw-r--r--  1 x x 18670 Jul 21 02:51 .gns3_perms
-rw-r--r--  1 x x   532 Jul 21 02:51 group
-rw-r--r--  1 x x   521 Jul 21 02:51 group-
-rw-r-----  1 x x   442 Jul 21 02:51 gshadow
-rw-r-----  1 x x   434 Jul 21 02:51 gshadow-
drwxr-xr-x  3 x x  4096 Jul 21 02:50 gss
-rw-r--r--  1 x x    92 Jul 21 02:51 host.conf
-rw-r--r--  1 x x    11 Jul 21 02:51 hostname
-rwxr-xr-x  1 x x   171 Jul 21 02:51 hosts
-rw-r--r--  1 x x   411 Jul 21 02:51 hosts.allow
-rw-r--r--  1 x x   711 Jul 21 02:51 hosts.deny
drwxr-xr-x  2 x x  4096 Jul 21 02:50 init
drwxr-xr-x  2 x x  4096 Jul 21 02:50 init.d
drwxr-xr-x  4 x x  4096 Jul 21 02:50 iproute2
-rw-r--r--  1 x x    26 Jul 21 02:51 issue
-rw-r--r--  1 x x    19 Jul 21 02:51 issue.net
drwxr-xr-x  3 x x  4096 Jul 21 02:50 kernel
drwxr-xr-x  2 x x  4096 Jul 21 02:50 ldap
-rw-r--r--  1 x x 17384 Jul 21 02:51 ld.so.cache
-rw-r--r--  1 x x    34 Jul 21 02:51 ld.so.conf
drwxr-xr-x  2 x x  4096 Jul 21 02:50 ld.so.conf.d
-rw-r--r--  1 x x   267 Jul 21 02:51 legal
-rw-r--r--  1 x x   191 Jul 21 02:51 libaudit.conf
drwxr-xr-x  3 x x  4096 Jul 21 02:50 logcheck
-rw-r--r--  1 x x 10550 Jul 21 02:51 login.defs
drwxr-xr-x  2 x x  4096 Jul 21 02:50 logrotate.d
-rw-r--r--  1 x x   105 Jul 21 02:51 lsb-release
-rw-r--r--  1 x x     0 Jul 21 02:51 machine-id
-rw-r--r--  1 x x   812 Jul 21 02:51 mke2fs.conf
lrwxrwxrwx  1 x x    12 Jul 21 02:51 mtab -> /proc/mounts
drwxr-xr-x  3 x x  4096 Jul 21 02:51 mysql
-rw-r--r--  1 x x  9048 Jul 21 02:51 nanorc
drwxr-xr-x  6 x x  4096 Jul 21 02:50 network
-rw-r--r--  1 x x    91 Jul 21 02:51 networks
drwxr-xr-x  8 x x  4096 Jul 21 02:50 nginx
-rw-r--r--  1 x x   497 Jul 21 02:51 nsswitch.conf
drwxr-xr-x  2 x x  4096 Jul 21 02:50 opt
lrwxrwxrwx  1 x x    21 Jul 21 02:51 os-release -> ../usr/lib/os-release
-rw-r--r--  1 x x   552 Jul 21 02:51 pam.conf
drwxr-xr-x  2 x x  4096 Jul 21 02:50 pam.d
-rw-r--r--  1 x x  1188 Jul 21 02:51 passwd
-rw-r--r--  1 x x  1188 Jul 21 02:51 passwd-
drwxr-xr-x  4 x x  4096 Jul 21 02:50 perl
-rw-r--r--  1 x x   581 Jul 21 02:51 profile
drwxr-xr-x  2 x x  4096 Jul 21 02:50 profile.d
-rw-r--r--  1 x x  2932 Jul 21 02:51 protocols
-rw-------  1 x x     0 Jul 21 02:51 .pwd.lock
drwxr-xr-x  2 x x  4096 Jul 21 02:51 rc0.d
drwxr-xr-x  2 x x  4096 Jul 21 02:51 rc1.d
drwxr-xr-x  2 x x  4096 Jul 21 02:51 rc2.d
drwxr-xr-x  2 x x  4096 Jul 21 02:51 rc3.d
drwxr-xr-x  2 x x  4096 Jul 21 02:51 rc4.d
drwxr-xr-x  2 x x  4096 Jul 21 02:51 rc5.d
drwxr-xr-x  2 x x  4096 Jul 21 02:51 rc6.d
drwxr-xr-x  2 x x  4096 Jul 21 02:51 rcS.d
-rwxr-xr-x  1 x x     0 Jul 21 02:51 resolv.conf
-rwxr-xr-x  1 x x   268 Jul 21 02:51 rmt
-rw-r--r--  1 x x   887 Jul 21 02:51 rpc
-rw-------  1 x x  1368 Jul 21 02:51 rsyslog.conf
drwxr-xr-x  2 x x  4096 Jul 21 02:50 rsyslog.d
-rw-r--r--  1 x x  4141 Jul 21 02:51 securetty
drwxr-xr-x  4 x x  4096 Jul 21 02:50 security
drwxr-xr-x  2 x x  4096 Jul 21 02:50 selinux
-rw-r--r--  1 x x 10368 Jul 21 02:51 sensors3.conf
drwxr-xr-x  2 x x  4096 Jul 21 02:50 sensors.d
-rw-r--r--  1 x x 19183 Jul 21 02:51 services
-rw-r-----  1 x x   737 Jul 21 02:51 shadow
-rw-r-----  1 x x   640 Jul 21 02:51 shadow-
-rw-r--r--  1 x x    73 Jul 21 02:51 shells
drwxr-xr-x  2 x x  4096 Jul 21 02:50 skel
drwxr-xr-x  2 x x  4096 Jul 21 02:50 snmp
drwxr-xr-x  2 x x  4096 Jul 21 02:50 ssh
-rw-r--r--  1 x x     0 Jul 21 02:51 subgid
-rw-r--r--  1 x x     0 Jul 21 02:51 subuid
-rw-r--r--  1 x x  2683 Jul 21 02:51 sysctl.conf
drwxr-xr-x  2 x x  4096 Jul 21 02:50 sysctl.d
drwxr-xr-x  3 x x  4096 Jul 21 02:50 systemd
drwxr-xr-x  2 x x  4096 Jul 21 02:50 terminfo
-rw-r--r--  1 x x  1260 Jul 21 02:51 ucf.conf
drwxr-xr-x  3 x x  4096 Jul 21 02:50 ufw
drwxr-xr-x  2 x x  4096 Jul 21 02:50 update-motd.d
drwxr-xr-x  2 x x  4096 Jul 21 02:50 vim
-rw-------  1 x x   127 Jul 21 02:51 vsftpd.conf
x@y:~/.../docker/49f44a39-556f-492b-b7e2-3671912813af/etc$ cd ..
x@y:~/.../project-files/docker/49f44a39-556f-492b-b7e2-3671912813af$ cd ..
x@y:~/.../nat-cloud-combo/project-files/docker$ cd ..
x@y:~/.../projects/nat-cloud-combo/project-files$ cd ..
x@y:~/GNS3/projects/nat-cloud-combo$ ls -al
total 1096
drwxrwxr-x  3 x x   4096 Jul 21 02:50  .
drwxr-xr-x 12 x x   4096 Jul 21 02:38  ..
-rw-r--r--  1 x x   5055 Jul 21 02:51  001-IOSv-IOSvL2.vim
-rw-r--r--  1 x x 140181 Jul 21 02:51  nat-cloud-combo.gns3
drwxr-xr-x  9 x x   4096 Jul 21 02:50  project-files
-rw-r--r--  1 x x 956174 Jul 21 02:51 'Screenshot from 2020-07-20 14-46-41.png'
x@y:~/GNS3/projects/nat-cloud-combo$ 
x@y:~/GNS3/projects/nat-cloud-combo$ /home/x/GNS3/projects/personal/dhcp-snooping/IOSvL2-15.2.1
bash: /home/x/GNS3/projects/personal/dhcp-snooping/IOSvL2-15.2.1: Is a directory
x@y:~/GNS3/projects/nat-cloud-combo$ cd /home/x/GNS3/projects/personal/dhcp-snooping/IOSvL2-15.2.1
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ ls -al
total 1096
drwxr-xr-x 3 x x   4096 Jul 21 02:49  .
drwxrwxr-x 3 x x   4096 Jul 21 02:48  ..
-rw-rw-r-- 1 x x   5055 Jul 19 20:08  001-IOSv-IOSvL2.vim
-rw-rw-r-- 1 x x 140181 Jul 21 02:35  nat-cloud-combo.gns3
drwxrwxr-x 9 x x   4096 Jul  9 05:19  project-files
-rw-rw-r-- 1 x x 956174 Jul 20 14:46 'Screenshot from 2020-07-20 14-46-41.png'
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ cp nat-cloud-combo.gns3 dhcp-snooping
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ mv dhcp-snooping dhcp-snooping.gns3
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ ls -al
total 1236
drwxr-xr-x 3 x x   4096 Jul 21 02:53  .
drwxrwxr-x 3 x x   4096 Jul 21 02:48  ..
-rw-rw-r-- 1 x x   5055 Jul 19 20:08  001-IOSv-IOSvL2.vim
-rw-r--r-- 1 x x 140181 Jul 21 02:53  dhcp-snooping.gns3
-rw-rw-r-- 1 x x 140181 Jul 21 02:35  nat-cloud-combo.gns3
drwxrwxr-x 9 x x   4096 Jul  9 05:19  project-files
-rw-rw-r-- 1 x x 956174 Jul 20 14:46 'Screenshot from 2020-07-20 14-46-41.png'
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ chmod +w dhcp-snooping.gns3
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ ls -al
total 1236
drwxr-xr-x 3 x x   4096 Jul 21 02:53  .
drwxrwxr-x 3 x x   4096 Jul 21 02:48  ..
-rw-rw-r-- 1 x x   5055 Jul 19 20:08  001-IOSv-IOSvL2.vim
-rw-r--r-- 1 x x 140181 Jul 21 02:53  dhcp-snooping.gns3
-rw-rw-r-- 1 x x 140181 Jul 21 02:35  nat-cloud-combo.gns3
drwxrwxr-x 9 x x   4096 Jul  9 05:19  project-files
-rw-rw-r-- 1 x x 956174 Jul 20 14:46 'Screenshot from 2020-07-20 14-46-41.png'
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ chmod u+w dhcp-snooping.gns3
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ ls -al
total 1236
drwxr-xr-x 3 x x   4096 Jul 21 02:53  .
drwxrwxr-x 3 x x   4096 Jul 21 02:48  ..
-rw-rw-r-- 1 x x   5055 Jul 19 20:08  001-IOSv-IOSvL2.vim
-rw-r--r-- 1 x x 140181 Jul 21 02:53  dhcp-snooping.gns3
-rw-rw-r-- 1 x x 140181 Jul 21 02:35  nat-cloud-combo.gns3
drwxrwxr-x 9 x x   4096 Jul  9 05:19  project-files
-rw-rw-r-- 1 x x 956174 Jul 20 14:46 'Screenshot from 2020-07-20 14-46-41.png'
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ pwd
/home/x/GNS3/projects/personal/dhcp-snooping/IOSvL2-15.2.1
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ chmod g+x /home/x/GNS3/projects/personal/dhcp-snooping/IOSvL2-15.2.1/dhcp-snooping.gns3
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ ls -al
total 1236
drwxr-xr-x 3 x x   4096 Jul 21 02:53  .
drwxrwxr-x 3 x x   4096 Jul 21 02:48  ..
-rw-rw-r-- 1 x x   5055 Jul 19 20:08  001-IOSv-IOSvL2.vim
-rw-r-xr-- 1 x x 140181 Jul 21 02:53  dhcp-snooping.gns3
-rw-rw-r-- 1 x x 140181 Jul 21 02:35  nat-cloud-combo.gns3
drwxrwxr-x 9 x x   4096 Jul  9 05:19  project-files
-rw-rw-r-- 1 x x 956174 Jul 20 14:46 'Screenshot from 2020-07-20 14-46-41.png'
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ chmod g-x /home/x/GNS3/projects/personal/dhcp-snooping/IOSvL2-15.2.1/dhcp-snooping.gns3
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ chmod g+w /home/x/GNS3/projects/personal/dhcp-snooping/IOSvL2-15.2.1/dhcp-snooping.gns3
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ ls -al
total 1236
drwxr-xr-x 3 x x   4096 Jul 21 02:53  .
drwxrwxr-x 3 x x   4096 Jul 21 02:48  ..
-rw-rw-r-- 1 x x   5055 Jul 19 20:08  001-IOSv-IOSvL2.vim
-rw-rw-r-- 1 x x 140181 Jul 21 02:53  dhcp-snooping.gns3
-rw-rw-r-- 1 x x 140181 Jul 21 02:35  nat-cloud-combo.gns3
drwxrwxr-x 9 x x   4096 Jul  9 05:19  project-files
-rw-rw-r-- 1 x x 956174 Jul 20 14:46 'Screenshot from 2020-07-20 14-46-41.png'
x@y:~/.../personal/dhcp-snooping/IOSvL2-15.2.1$ cd ~
x@y:~$ 

shrug I have everything working.

ghost commented 4 years ago

Oh, the primary cause of the me dropping into terminal mode was that in GNS3 2.2.10 on my Ubuntu 18.04, which is run via the local server only enabled, that the "save project as" did not work. I do not know if I had the console working and my ubuntu machine does not log everything like my windows machine logs things that's in my to do bucket.

The GNS3 2.1.10 while fully working with this IOSvL2 project does not show as a "Recent Project" - now that is a totally different issue. But that issue has existed the last 5 restarts of GNS3. My IOSvL2 project is open right now and is active and the gns3_server.log - I am sure - is running merrily along at a debug level 0 - I will fix that debug level 0 before the sun goes down.

yoennb commented 1 week ago

I just ran into the same problem. I am using GNS3 2.2.49 on VMWare ESXi (VM version: 0.16.0), and also use docker in my project.

This is the error I got:

Could not create snapshot file '/opt/gns3/projects/8fea4433-4b7e-4c65-a2eb-45bb978dd9cb/snapshots/decor_200924_071023.gns3project': [Errno 13] Permission denied: '/opt/gns3/projects/8fea4433-4b7e-4c65-a2eb-45bb978dd9cb/project-files/docker/35bfca08-2a07-46e4-8b29-cf54d1a12022/var/lib/clickhouse/user_scripts'

Could not export file /opt/gns3/projects/8fea4433-4b7e-4c65-a2eb-45bb978dd9cb/project-files/docker/435a3a7c-408a-4077-94b1-d3b392584e7b/root/.cache/.lxterminal-socket-:100: [Errno 6] No such device or address: '/opt/gns3/projects/8fea4433-4b7e-4c65-a2eb-45bb978dd9cb/project-files/docker/435a3a7c-408a-4077-94b1-d3b392584e7b/root/.cache/.lxterminal-socket-:100'

I am not sure the second line is relevant. It shows up as a warning, not an error. Regarding the first one, this is what I see as root user in the filesystem:

root@gns3vm:/home/gns3# ls -lh /opt/gns3/projects/8fea4433-4b7e-4c65-a2eb-45bb978dd9cb/project-files/docker/35bfca08-2a07-46e4-8b29-cf54d1a12022/var/lib/clickhouse/user_scripts
total 0
root@gns3vm:/home/gns3# ls -lh /opt/gns3/projects/8fea4433-4b7e-4c65-a2eb-45bb978dd9cb/project-files/docker/35bfca08-2a07-46e4-8b29-cf54d1a12022/var/lib/clickhouse/
total 52K
drwxr-x---  2 systemd-resolve systemd-journal 4.0K Aug 21 11:19 access
drwxr-x---  5 systemd-resolve systemd-journal 4.0K Aug 21 11:19 data
drwxr-x---  2 systemd-resolve systemd-journal 4.0K Aug 21 11:19 dictionaries_lib
drwxr-x---  2 systemd-resolve systemd-journal 4.0K Aug 21 11:19 flags
drwxr-xr-x  2 systemd-resolve systemd-journal 4.0K Aug 21 11:19 format_schemas
drwxr-x---  2 systemd-resolve systemd-journal 4.0K Aug 21 11:19 metadata
drwxr-x---  2 systemd-resolve systemd-journal 4.0K Aug 21 11:19 metadata_dropped
drwxr-x---  2 systemd-resolve systemd-journal 4.0K Aug 21 11:19 preprocessed_configs
drwxr-x--- 10 systemd-resolve systemd-journal 4.0K Aug 21 11:19 store
drwxr-xr-x  2 systemd-resolve systemd-journal 4.0K Aug 21 11:19 tmp
drwxr-x---  2 systemd-resolve systemd-journal 4.0K Aug 21 11:19 user_defined
drwxr-xr-x  2 systemd-resolve systemd-journal 4.0K Aug 21 11:19 user_files
drwxr-x---  2 systemd-resolve systemd-journal 4.0K Aug 21 11:19 user_scripts

The gns3 user cannot ls the user_scripts directory, and probably not most of the others as well.

Is there any known workaround?

grossmj commented 5 days ago

Do you know if I can access the Docker image you use so I can reproduce the problem on my side? thanks.

yoennb commented 5 days ago

Hello, I have tried to reproduce the error on a new project, but now the owner of the files listed above on the new container is gns3, therefore the snapshot / export process runs correctly. I don't know what I did the first time that led systemd-resolve own these files. I will try to dig a bit deeper and see if I can reproduce the error on another image.

yoennb commented 5 days ago

Ok, so now I understand a little better. systemd-resolve corresponds to the clickhouse user id on the docker image I am using (clickhouse/clickhouse-server), and it is the user which creates these files/directories at first. Then when the container is stopped, gns3 transfers the ownership of all these files under project-files/ to itself. However, for some reason I cannot explain, my initial project contains some directories under /opt/gns3/projects/.../project_files/docker which belong to containers that do not exist anymore, and these directories were not deleted as they should have been. Plus, the ownership of the content of these directories was not transferred to gns3, hence the error. Maybe the gns3 VM was accidentally powered off suddenly and things were not properly cleaned up.

grossmj commented 3 days ago

Ok no worries, please let us know if you see the problem again 👍