1

All problems started when I changed ownership and permission with gksu nautilus from the ETC and SBIN folder. After realizing what I had done, I followed some online threads and I've put back chmod and chown to the way it's supposed to be. Some problems were resolved.

1st problem:

Command '<command' is available in '/sbin/' The command could not be located because '/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with your user account.
: command not found

The same error is found in this question: The command could not be located because '/sbin' is not included in the PATH environment variable

The solution they gave me in that link did not work for me. I have the following code in my environment file: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

2nd problem:

When I type sudo su I get:

unable to stat /etc/sudoers.d/README: no such file or directory

3rd problem:

FileZilla won't give me permission to the FTP to my Linux server, even when I use the IP address which should work.

4th problem:

My host name stopped working for local computers on the network, the IP address does work, and I can see my files from the IP address.


Update

I executed the following commands from https://askubuntu.com/questions/308939/how-to-reset-default-permissions-for-etc:
$ sudo su
# chown -R root:root /etc
# find /etc -type f -exec chmod 644 {} +
# find /etc -type d -exec chmod 755 {} +
# chmod 755 /etc/init.d/* /etc/rc.local /etc/network/* /etc/cron.*/*

Things started working. However I might have done something in the process and now I get an error message when I open the terminal:

There was an error creating the child process for this terminal.
Getpt failed: Permission denied.

I still have access to my terminal, I haven't closed it yet. Any fix for that before I close my terminal?

Update

I fixed everything, however network-manager doesn't start on boot. There is no internet connection unless I type in terminal start network-manager. I use this computer as a server. I need a solution.
2
  • 1
    " I changed ownership and permission with gksu nautilus from the ETC and SBIN" It might help if you tell us what the change was. But I would suggest to consider a re-install (without formatting the disk). That is a guaranteed working method. Manually changing the permissions is possible but you need to do that from a live dvd and will be a lot of manual work.
    – Rinzwind
    May 21, 2015 at 11:55
  • i believe it was owner permission and the read write. Its fix now but i have a new problem. check update
    – Abe.S
    May 21, 2015 at 17:38

1 Answer 1

0
  • Files inside /bin/ need to be 755 except for symlinks those needs to be 777 and all are owned by root:root.
  • Files inside /etc/ need to be 644 and owned by root:root except for (if you have any of these that is):

    -rw-r----- 1 root daemon 144 2007-02-20 13:41 at.deny drwxr-xr-x 2 root root 4096 2007-11-14 11:01 libpaper.d -rw-r----- 1 root fuse 216 2008-02-26 18:25 fuse.conf drwxr-xr-x 2 root root 4096 2008-03-26 18:23 lsb-base drwxr-xr-x 2 root root 4096 2008-04-01 14:45 jvm.d

    (there might be other files for you). Again: symlinks those needs to be 777. directories need to to be 755.

With this you should be able to manually reset them from a live dvd. If you have a 2nd similar operating system it is also possible to copy the permissons from that system. This answer from jlovi can be used to create a file with the permission in them. And executed on the broken system to restore the permissions.

If this is not possible you can also re-install without formatting. That will keep your documents safe but will re-install the Ubuntu system files.

2
  • Can you please give me some guidance in terminal.
    – Abe.S
    May 21, 2015 at 15:59
  • Sorry for the newbie question, i don't know what this is. can you please explain? -rw-r----- 1 root daemon 144 2007-02-20 13:41 at.deny drwxr-xr-x 2 root root 4096 2007-11-14 11:01 libpaper.d -rw-r----- 1 root fuse 216 2008-02-26 18:25 fuse.conf drwxr-xr-x 2 root root 4096 2008-03-26 18:23 lsb-base drwxr-xr-x 2 root root 4096 2008-04-01 14:45 jvm.d (there might be other files for you). Again: symlinks those needs to be 777. directories need to to be 755.
    – Abe.S
    May 21, 2015 at 16:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .