WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: mkdir can't create directory /home/tc/.local permission denied  (Read 24514 times)

Offline memartin

  • Newbie
  • *
  • Posts: 5
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #15 on: November 07, 2013, 08:05:10 AM »
core.gz and vmlinuz from the current ISO, md5sum verified (like above).

my syslinux menu.cfg looks like

Code: [Select]
label tinycore
  menu label Tiny Core Linux v5.0.2
  kernel http://bootserver.local/tinycore/vmlinuz
  initrd http://bootserver.local/tinycore/core.gz
  append base norestore httplist=bootserver.local/tinycore/extensions.php kmap=qwertz/de-latin1

The httplist Script is just a PHP snippet that does a listing of *.tcz in my tce dir on the boot server, generating relative links to the packages. These are also from the current ISO.

Nothing special I suppose. Updated today from 4.5.2 (IIRC), which worked fine before. Anything I am missing?

Thanks for putting up with this,

Martin

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #16 on: November 07, 2013, 08:58:04 AM »
httplist must be a file that contains a list of tczs, not a php script.

Offline memartin

  • Newbie
  • *
  • Posts: 5
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #17 on: November 07, 2013, 02:56:57 PM »
Nevermind, I am sure this is not the problem since the extensions get downloaded fine and the setup has been working for nearly two years now. Seen from tinycore the httplist script is just a text file, just that it's created dynamically from a directory listing. Here's the output:

Code: [Select]
# curl http://bootserver.local/tinycore/extensions.php
/tinycore/tce/Xlibs.tcz
/tinycore/tce/Xprogs.tcz
/tinycore/tce/Xvesa.tcz
/tinycore/tce/aterm.tcz
/tinycore/tce/fltk-1.1.10.tcz
/tinycore/tce/flwm_topside.tcz
/tinycore/tce/freetype.tcz
/tinycore/tce/imlib2-bin.tcz
/tinycore/tce/imlib2.tcz
/tinycore/tce/libICE.tcz
/tinycore/tce/libSM.tcz
/tinycore/tce/libX11.tcz
/tinycore/tce/libXau.tcz
/tinycore/tce/libXdmcp.tcz
/tinycore/tce/libXext.tcz
/tinycore/tce/libXfont.tcz
/tinycore/tce/libXi.tcz
/tinycore/tce/libXmu.tcz
/tinycore/tce/libXpm.tcz
/tinycore/tce/libXrandr.tcz
/tinycore/tce/libXrender.tcz
/tinycore/tce/libXt.tcz
/tinycore/tce/libfontenc.tcz
/tinycore/tce/libjpeg-turbo.tcz
/tinycore/tce/libpng.tcz
/tinycore/tce/libxcb.tcz
/tinycore/tce/wbar.tcz


The problem I am experiencing is the error message from the OP during boot, and a set of folders with strange permissions, mainly being not writeable by the 'tc' user or even belonging to 'root'. This includes /tmp/tce[/optional] and even /home/tc, so no user setting files can be written without correcting ownership/permissions beforehand. (Thinking about it, the mkdir error should be a consequence of /home/tc belonging to root.)

This is written from mind ATM, I can give more detail when I'm back at the office tomorrow.

Thanks again, Martin

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #18 on: November 07, 2013, 06:09:45 PM »
Try a fresh install.  If you updated from 4.5.2 you probably have some thing incompatible remaining from 4.5.2.

Offline memartin

  • Newbie
  • *
  • Posts: 5
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #19 on: November 08, 2013, 02:55:35 PM »
Sorry for the misunderstanding, but there is no install. I am booting the extracted core.gz and vmlinuz from the 5.0.2 ISO via PXE (see Syslinux menu.cfg entry above) and pulling the *.tzc extracted from the same ISO via HTTP List. A Setup that has been working for months, if not years. No local files on the client, nothing to install "fresh".

By "updated" I mean I exchanged the core.gz and vmlinuz as well as the tcz files with the new files from the ISO on the TFTP server. The same way I am doing this all the time. No legacy files from older TCs on the server side, averything is deleted then extracted anew.

But something might be strange on my side nevertheless. Today, without changes from yesterday, three of my preconfigured TinyCores do not boot into graphics mode anymore. showbootcodes yields an empty line, yesterday everything was fine there. So maybe there's something going on with my PXE stack after switching from gPXE to iPXE.

I'll look into it further and let you know if I can reproduce this permissions thing reliably. I'll be glad to provide some more detailed info then.

So thanks again for your feedback so far!

Cheerz, Martin

Offline MSumulong

  • Newbie
  • *
  • Posts: 25
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #20 on: December 10, 2013, 10:46:51 AM »
I have a pretty similar setup and I am having the same exact issue. I am booting tinycore 5.0.2 from iPXE and after booting up I get the same error message:

Code: [Select]
mkdir: can't create directory '/home/tc/.local/': Permission denied
showbootcodes outputs the following:

Code: [Select]
initrd=core.gz,customize.gz vga=792 BOOT_IMAGE=vmlinuz
What is trying to create this .local folder?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #21 on: December 10, 2013, 11:22:26 AM »
The setupHone() function in tc-functions creates /home/"$USER"/.local/bin
I suspect you have something in customize.gz that is causing the mkdir to fail.
                                             

Offline MSumulong

  • Newbie
  • *
  • Posts: 25
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #22 on: December 10, 2013, 11:38:21 AM »
I do have a few scripts in /home/tc that are stored in customize.gz... I moved them to /usr/local and got rid of the /home/tc directory and it looks like that fixed the issue.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #23 on: December 10, 2013, 11:47:14 AM »
You could have just ignored the message.

Offline MSumulong

  • Newbie
  • *
  • Posts: 25
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #24 on: December 10, 2013, 11:55:11 AM »
I suppose. But what about all the things created in setupHome()? I'm not exactly sure what is going on there...

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #25 on: December 10, 2013, 11:59:22 AM »
It is creating empty directories that are searched by the system for executables and startup scripts.

Offline Blues_Wolf

  • Newbie
  • *
  • Posts: 8
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #26 on: January 10, 2014, 11:54:28 AM »
Hi, I got the same cannot create folder error.

I'm PXE booting with the latest core.gz from the webpage unmodified, and loading the extensions via tftp at boot time with the following command.

append initrd=images/thinclient/core.gz tftplist=192.168.160.34:/pxe/images/thinclient/extensions/syt.lst

syt.lst is a plain text file with the extensions' tftp path (extensions load fine apparently)

Extensions are those in the TinyCore 15MB .iso image
So I've disabled all extensions and started enabling one at the time to see which one was causing the issue.
It turns out 2 extensions are the ones causing it.
Xlibs.tcz
wbar.tcz


I can enable all extensions, but as soon as I enable any of those 2, I get the error.

Are they supposed to be loaded in a specific order? Why is this happening when loading them remotely but don't if I boot the full .iso with them?

Thanks
« Last Edit: January 10, 2014, 12:35:57 PM by Blues_Wolf »

Offline Blues_Wolf

  • Newbie
  • *
  • Posts: 8
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #27 on: January 10, 2014, 01:04:53 PM »
Update:
I've created a custom initrd image with just those 2 extensions and loaded the rest through tftp as before and it works without errors.

Somehow, those two extensions conflict with the boot process when loaded through tftp, I would like to found out why though :S

Here's my workaround:

Code: [Select]
# unsquashfs -f Xlibs.tcz
# unsquashfs -f wbar.tcz
# cd squashfs-root
# find | cpio -o -H newc | gzip -2 > images/thinclient/conflict.gz

Then used the following boot codes:

Code: [Select]
append initrd=images/thinclient/core.gz,images/thinclient/conflict.gz tftplist=192.168.160.34:/pxe/images/thinclient/extensions/syt.lst
Regards

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #28 on: January 10, 2014, 01:16:11 PM »
When you use tftp to load extensions, there is no dependency resolution.
Each exprension is installed as it is loaded.
TFTP should be used only to load the extensions necessary to provide a network based persistent tce directory.
Once the tce directory is mounted, the normal onboot.lst processing will work with proper dependency handling.
I suggest you setup an NFS share for normal operations.
If you do not want the clients to modify contents, export the share as read-write only to a single maintenance client and allow read-only access to the rest.

Offline Blues_Wolf

  • Newbie
  • *
  • Posts: 8
Re: mkdir can't create directory /home/tc/.local permission denied
« Reply #29 on: July 24, 2014, 12:34:12 PM »
Hi Again,

Now with TCL 5.3

Error seems to be cause by the tc folder ownership.
It's owned by root:root with no Write permissions for user tc

Now, after the MOTD one of the packages tries to create the .local folder with the tc credentials and it's unable to.

I'm gonna try as workaround to create a package that modifies the folder ownership to tc:staff when loaded, and load it before any other package.
I'm currently netbooting TCL5.3 using HTTP and an httplist bootcode, nothing more.

PS: I don't get this error when using TCL 4.x

EDIT: Workaround worked, Attached is the .tcz
But it will be great to find another way to fix it
« Last Edit: July 24, 2014, 01:04:25 PM by Blues_Wolf »