Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35

Thread: Cannot create a file in /home directory

  1. #1
    Join Date
    Oct 2011
    Location
    Ohio, USA
    Beans
    420
    Distro
    Ubuntu

    Cannot create a file in /home directory

    Maybe I'm doing this wrong, but I simply cannot create a file (or a directory either) in my home directory in a terminal or in Thunar (Create File and Create Directory are grayed out). I can do it everywhere else (including in an already existing directory in my home directory) except where I need it.

    I've tried making myself root (SUDO -i) and trying to create it after CD-ing to my home directory, but that fails the same way: "Operation not permitted."

    I've even logged on as root. Still fails.

    How do I create a file in my own home directory?

    Bill
    Last edited by WB0HYQ; August 5th, 2021 at 01:39 AM.
    Been in computers since 1962; Windows computers almost gone now. Only 1 gaming machine left.

  2. #2
    Join Date
    Aug 2013
    Beans
    4,729

    Re: Cannot create a file in /home directory

    Hi, I don't use xfce or thunar but it seems that you have to create a template first like for nautilus https://forum.xfce.org/viewtopic.php?id=11873

    I don't know why they follow gnome's idiotic practice.

  3. #3
    Join Date
    Oct 2011
    Location
    Ohio, USA
    Beans
    420
    Distro
    Ubuntu

    Re: Cannot create a file in /home directory

    Not quite right. What you cited is an entirely different problem.

    In Terminal, if I issue: LS -a, I get an entire list of every file in my home directory, including the dotted files. What I want to do is create another file in this same directory and I keep getting told I can't do it.

    For example:

    Code:
    root@bill-UBU:/home/bill# cat > xxx.txt
    -bash: xxx.txt: Operation not permitted
    root@bill-UBU:/home/bill# touch xxx.txt
    touch: setting times of 'xxx.txt': No such file or directory
    root@bill-UBU:/home/bill# mkdir .text
    mkdir: cannot create directory ‘.text’: Operation not permitted
    root@bill-UBU:/home/bill# mkdir test
    mkdir: cannot create directory ‘test’: Operation not permitted
    root@bill-UBU:/home/bill#
    Note this is being attempted as ROOT. How much higher do I have to go than root?

    Bill
    Last edited by WB0HYQ; August 5th, 2021 at 01:40 AM.
    Been in computers since 1962; Windows computers almost gone now. Only 1 gaming machine left.

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Cannot create a file in /home directory

    Your root's home is usually locked and you do not want to use it anyway.

    You need to be in your user's home.

    List some of /home. You do not need to show everything. Just a few examples.

    fred@z97-focal-kubuntu:~$ ls -l


    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #5
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    6,055
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Cannot create a file in /home directory

    Quote Originally Posted by monkeybrain20122 View Post
    Hi, I don't use xfce or thunar but it seems that you have to create a template first like for nautilus https://forum.xfce.org/viewtopic.php?id=11873

    I don't know why they follow gnome's idiotic practice.
    I haven't installed any templates, but have no problem creating files on Xubuntu from the right mouse click menu. I just don't see the purpose of creating an empty file from a mouse click.

    Quote Originally Posted by WB0HYQ View Post
    Not quite right. What you cited is an entirely different problem.

    In Terminal, if I issue: LS -a, I get an entire list of every file in my home directory, including the dotted files. What I want to do is create another file in this same directory and I keep getting told I can't do it.

    For example:

    Code:
    root@bill-UBU:/home/bill# cat > xxx.txt
    -bash: xxx.txt: Operation not permitted
    root@bill-UBU:/home/bill# touch xxx.txt
    touch: setting times of 'xxx.txt': No such file or directory
    root@bill-UBU:/home/bill# mkdir .text
    mkdir: cannot create directory ‘.text’: Operation not permitted
    root@bill-UBU:/home/bill# mkdir test
    mkdir: cannot create directory ‘test’: Operation not permitted
    root@bill-UBU:/home/bill#
    Note this is being attempted as ROOT. How much higher do I have to go than root?

    Bill
    I assume mkdir just calls the mkdir() system call and reports the error it receives from there. You can look up the error string with errno -l, telling us this is EPERM. According to the manual (man -s2 mkdir), this means
    Code:
           EPERM  The filesystem containing pathname does not support the creation
                  of directories.
    So not a normal permissions issue. Doing this as the root user would have helped against "Permission denied":
    Code:
           EACCES The  parent  directory  does  not  allow write permission to the
                  process, or one of the directories in  pathname  did  not  allow
                  search permission.  (See also path_resolution(7).)
    It would be great if I knew the solution, but I think this is a lead. Anything peculiar about the filesystem? Reached some sort of filesystem limit?

  6. #6
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,304
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Cannot create a file in /home directory

    I wonder if it's mounted in a funny way. Can you post the output from this comand so we can figure out how it's mounted?
    Code:
    mount | awk '!/snap|sys/' | column -t
    Last edited by The Cog; August 5th, 2021 at 03:01 PM.

  7. #7
    Join Date
    Apr 2014
    Beans
    809

    Re: Cannot create a file in /home directory

    Indeed. Read only sounds like the issue here. You probably didn't do that intentionally. May mean disk is going

  8. #8
    Join Date
    Oct 2011
    Location
    Ohio, USA
    Beans
    420
    Distro
    Ubuntu

    Re: Cannot create a file in /home directory

    Quote Originally Posted by oldfred View Post
    Your root's home is usually locked and you do not want to use it anyway.

    You need to be in your user's home.

    List some of /home. You do not need to show everything. Just a few examples.

    fred@z97-focal-kubuntu:~$ ls -l

    I am positive I am in /home/bill (even signed on as root) as I did CD and then an LS to make sure I was where I wanted to be.

    Bill
    Been in computers since 1962; Windows computers almost gone now. Only 1 gaming machine left.

  9. #9
    Join Date
    Oct 2011
    Location
    Ohio, USA
    Beans
    420
    Distro
    Ubuntu

    Re: Cannot create a file in /home directory

    Quote Originally Posted by Impavidus View Post
    I haven't installed any templates, but have no problem creating files on Xubuntu from the right mouse click menu. I just don't see the purpose of creating an empty file from a mouse click.


    I assume mkdir just calls the mkdir() system call and reports the error it receives from there. You can look up the error string with errno -l, telling us this is EPERM. According to the manual (man -s2 mkdir), this means
    Code:
           EPERM  The filesystem containing pathname does not support the creation
                  of directories.
    So not a normal permissions issue. Doing this as the root user would have helped against "Permission denied":
    Code:
           EACCES The  parent  directory  does  not  allow write permission to the
                  process, or one of the directories in  pathname  did  not  allow
                  search permission.  (See also path_resolution(7).)
    It would be great if I knew the solution, but I think this is a lead. Anything peculiar about the filesystem? Reached some sort of filesystem limit?
    Nothing peculiar that I can see. I made sure I was first set up as root, then did a CD to /home/bill (my actual user directory) and tried to create the file or directory there. No dice.

    Bill
    Been in computers since 1962; Windows computers almost gone now. Only 1 gaming machine left.

  10. #10
    Join Date
    Oct 2011
    Location
    Ohio, USA
    Beans
    420
    Distro
    Ubuntu

    Re: Cannot create a file in /home directory

    Quote Originally Posted by The Cog View Post
    I wonder if it's mounted in a funny way. Can you post the output from this comand so we can figure out how it's mounted?
    Code:
    mount | awk '!/snap|sys/' | column -t
    Here's the result:

    Code:
    bill@bill-UBU:~$ mount | awk '!/snap|sys/' | column -t
    proc        on  /proc                type  proc             (rw,nosuid,nodev,noexec,relatime)
    udev        on  /dev                 type  devtmpfs         (rw,nosuid,noexec,relatime,size=8134492k,nr_inodes=2033623,mode=755)
    devpts      on  /dev/pts             type  devpts           (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
    tmpfs       on  /run                 type  tmpfs            (rw,nosuid,nodev,noexec,relatime,size=1639368k,mode=755)
    /dev/sdb1   on  /                    type  ext4             (rw,relatime,errors=remount-ro)
    tmpfs       on  /dev/shm             type  tmpfs            (rw,nosuid,nodev)
    tmpfs       on  /run/lock            type  tmpfs            (rw,nosuid,nodev,noexec,relatime,size=5120k)
    mqueue      on  /dev/mqueue          type  mqueue           (rw,nosuid,nodev,noexec,relatime)
    hugetlbfs   on  /dev/hugepages       type  hugetlbfs        (rw,relatime,pagesize=2M)
    tmpfs       on  /run/user/1000       type  tmpfs            (rw,nosuid,nodev,relatime,size=1639364k,mode=700,uid=1000,gid=1000)
    gvfsd-fuse  on  /run/user/1000/gvfs  type  fuse.gvfsd-fuse  (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
    /dev/fuse   on  /run/user/1000/doc   type  fuse             (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
    /dev/sda1   on  /media/bill/WIN764   type  fuseblk          (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,uhelper=udisks2)
    /dev/sde1   on  /media/bill/My Book  type  fuseblk          (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
    /dev/sdc    on  /media/bill/Big_U      type  fuseblk          (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
    bill@bill-UBU:~$
    Nothing strange I can see, but I'm not an expert.

    Bill
    Last edited by WB0HYQ; August 5th, 2021 at 04:46 PM.
    Been in computers since 1962; Windows computers almost gone now. Only 1 gaming machine left.

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •