Add a New Comment (Rich Markup)
Comment Type & Canned Response: None No canned response available
Yes, the directory did not existed yet.
hmm I cannot reproduce this.
did the directory /home/testjail2 exist before the command or not?
hmm your patch makes the error message go away, but the code shouldn't be executed if the directory already exists...
I'll have to test this
running jk_init at the first time throws below exception:
$ sudo jk_init -j /home/testjail2 jk_lsh -f ERROR: cannot lstat() /home/testjail2 /home Creating jail /home/testjail2 Traceback (most recent call last): File "/usr/local/sbin/jk_init", line 246, in <module> main() File "/usr/local/sbin/jk_init", line 243, in main activateConfig(config, jail, args) File "/usr/local/sbin/jk_init", line 163, in activateConfig ji.handle_cfg_section(config,jail,cfg,section) File "/usr/local/sbin/jk_init", line 98, in handle_cfg_section self.handle_cfg_section(config,chroot,cfg,tmp) File "/usr/local/sbin/jk_init", line 133, in handle_cfg_section jk_lib.init_passwd_and_group(chroot,users,groups,config['verbose']) File "/usr/local/share/jailkit/jk_lib.py", line 738, in init_passwd_and_group create_parent_path(chroot,'/etc/', be_verbose, copy_permissions=0, allow_suid=0, copy_ownership=0) File "/usr/local/share/jailkit/jk_lib.py", line 445, in create_parent_path os.mkdir(jailpath, 0755) OSError: [Errno 17] File exists: '/home/testjail2/etc/'
running it a second time, it works as expected.
Appended patch fixes the problem for me. However, I'm not perfectly sure whether this is the right way to fix it. I ran into the same problem on SLES 11 and OpenBSD.
patch is against jailkit-2.11
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only logged-in users can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 2 latest changes.
Copyright © 2022 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.9