Linux group 998,what does it mean? [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Ubuntu 20 LTS, Installed laradock,
in Ubuntu
$ pwd
/root/Docker
$ ls
blog laradock
$ rsync -a /media/sf_code/blog . && chmod -R 755 blog
$ cd laracock
$ docker-compose exec --user=root workspace bash
in docker
> ll
total 20
drwxr-xr-x 4 laradock laradock 4096 Nov 12 06:52 ./
drwxr-xr-x 1 root root 4096 Nov 12 02:30 ../
drwxr-xr-x 12 root 998 4096 Nov 12 03:09 blog/
drwxr-xr-x 74 laradock laradock 4096 Nov 12 06:35 laradock/
what does 998 mean?

The 4th column is the group id. It there is an entry in /etc/group with this id, then the group name will be printed otherwise the id.
The your example the group id of folder blog is 998 but no group exist inside the container with this id. Mapping a folder to a docker container does not change owner or group.
Some explanation can be found here

Related

Soft Link redirection in linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have created a soft link as follows:
/bip/etl>ln -s /bip/etl bipet
And now can see the soft link being created as well..
/bip/etl>ls -lrt |tail
-rw-rw-rw- 1 cdtbipx cduserg 24988174 Jun 19 19:17 227015716_WLR3PSTN_Filtered_06202016_5of6.csv.gz.gpg
-rw-rw-rw- 1 cdtbipx cduserg 23857587 Jun 19 19:17 227015716_WLR3PSTN_Filtered_06202016_6of6.csv.gz.gpg
drwxrwxrwx 1082 prod release 61440 Jul 3 02:51 WSC
drwxrwxrwx 5 oracle oinstall 4096 Jul 4 01:22 dsl
lrwxrwxrwx 1 cdtbipx cduserg 8 Jul 4 08:43 bipet -> /bip/etl
However, I cannot refer to the soft link bipet while I try to search a specific file in the concerned folder.
ls -lrt /bipetl/227015716_WLR3PSTN_Filtered_06202016_6of6.csv.gz.gpg
ls: /bipetl/227015716_WLR3PSTN_Filtered_06202016_6of6.csv.gz.gpg: No such file or directory
What am I doing wrong here?
You created a link bipet in directory /bip/etl (current working directory when you did ln).
You you should do:
ls -lrt /bip/etl/bipetl/227015716_WLR3PSTN_Filtered_06202016_6of6.csv.gz.gpg
Or create the link using (assuming you have privileges to write to the /):
ln -s /bip/etl /bipet
And then you can do:
ls -lrt /bipetl/227015716_WLR3PSTN_Filtered_06202016_6of6.csv.gz.gpg

can't change to sudoers.d directory [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Simple question: I have a user called "user" on my system. This user has sudo privileges. Why can't I browse into the sudoer.d directory then?
Is it because cd is a built-in command?
[user#localhost etc]$ ls -al | grep sudoers.d
drwxr-x---. 2 root root 4096 Apr 4 18:09 sudoers.d
[user#localhost etc]$ sudo cd sudoers.d
[user#localhost etc]$ pwd
/etc
[user#localhost etc]$ sudo ls -la sudoers.d/
total 12
drwxr-x---. 2 root root 4096 Apr 4 18:09 .
drwxr-xr-x. 79 root root 4096 May 5 05:20 ..
-r--r-----. 1 root root 33 Apr 4 18:09 vagrant
[user#localhost etc]$ sudo vim sudoers.d/vagrant
[user#localhost etc]$
Thanks a lot.
It happens because sudo simply executes the command executable you pass to it with elevated privileges, and forwards the rest of arguments. Since cd is a shell builtin, sudo won't find the file to execute, which results in an error.
If you wish to have an interactive shell with elevated privileges, use sudo su
sudo opens a new shell. That shell changes its working directory. And then it exits. The original shell's working directory is never changed, nor can it be.

Linux memory issue [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have a problem on my server.
When i try to start my server, it says that "there no left space on device"
If i execute the command "df", I see that on directory if full.
/dev/mapper/owegdc_vg-owegdc_logs_lv
10321208 9797004 0 100% /opt/application/owegdc/logs
When i get to the logs directory here what i see
ls -lrta
total 368
drwxr-x--- 2 oweadm grpowe 16384 Jan 15 2014 lost+found
drwxr-x--- 7 oweadm grpowe 4096 Jun 18 11:55 .
drwxr-xr-x 2 oweadm grpowe 12288 Aug 4 10:20 apache
drwxr-xr-x 2 oweadm grpowe 4096 Aug 5 00:56 batches
drwxr-xr-x 2 oweadm grpowe 4096 Sep 10 13:43 expl
drwxr-xr-x 2 oweadm grpowe 327680 Sep 10 13:50 jonas
drwxr-xr-x 11 oweadm grpowe 4096 Sep 10 13:50 ..
du -sk
9642792 .
I tried things like 'lsof' but it didn't work...
Do you have an idea ?
Thx
You could just try something like
du | sort -h -r
That would list the directories on your disk, ordered by their size descending. The first directory in the output list is the biggest one.
Better, if you're looking for large single files instead of a directory, this answer on Unix & Linux gives useful information, especially this:
find . -type f | xargs du -h | sort -rn
The output is the same, but it lists files instead of dirs.

Ubuntu 12.04 add existing user to group [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I have problem with Ubuntu.
I'm trying add user tbalicek to group www-data but the following commands doesn't work.
tbalicek#UBK-LINUX:/var/www$ sudo usermod -a -G www-data tbalicek
tbalicek#UBK-LINUX:/var/www$ groups
tbalicek sudo
tbalicek#UBK-LINUX:/var/www$ groups tbalicek
tbalicek : tbalicek www-data
I don't understand why groups and groups tbalicek return different results?? When I'm loged like tbalicek
When I'm trying mkdir like tbalicek in folder where si own group www-data I get: permission denied
tbalicek#UBK-LINUX:/var/www$ ls -ltr
total 20
-rwxrwxr-x 1 www-data www-data 31 Mar 27 13:52 index.php
drwxrwxr-x 9 www-data www-data 4096 Mar 27 17:16 pelnar
drwxrwxr-x 16 www-data www-data 4096 Mar 27 17:21 redmine
drwxrwxr-x 9 www-data www-data 4096 Apr 3 17:54 taskagent
-rwxrwxr-x 1 root root 22 Apr 10 14:35 info.php
tbalicek#UBK-LINUX:/var/www$
Group assignments don't take effect in the current shell. You have to log out and log back in to see the group changes.
From the Debian Wiki for sudo:
After being added to a new group the user must log out and then log back in again for the new group to take effect. Groups are only assigned to users at login time. A most common source of confusion is that people add themselves to a new group but then do not log out and back in again and then have problems because the group is not assigned.
You might get a better response for this sort of question on ServerFault.
Try the newgrp command:
ts#cmp:~$ id
uid=1001(ts) gid=1001(ts) groups=1001(ts),27(sudo)
ts#cmp:~$ newgrp www-data
ts#cmp:~$ id
uid=1001(ts) gid=33(www-data) groups=1001(ts),27(sudo),33(www-data)
Just a nitpick, 'sudo adduser user group' will also add a user to a group and I find the syntax easier to remember than using usermod.

Chown not working [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
On Ubuntu 12.04, the chown command doesn't seem to be working like it should
root#server:/var/www/folder/# ls -al
Running this puts out
drwxr-xr-x 11 776 sftponly 4096 Feb 17 14:08 Other_Folder
I need write permissions for the group, so I run:
chown -R 776 ./Other_Folder
Then when I run ls -al again, the output is still
drwxr-xr-x 11 776 sftponly 4096 Feb 17 14:08 Other_Folder
chown is used to change ownership of the file, not change permissions.
ls -al is not showing you who owns the file, just its permissions.
If root owns those files, you'll need to chown them properly, before you can change their permissions:
chown -R yourname:yourname folderName
Then as the owner you can change their permissions:
chmod -R 776 folderName
Edit:
I double checked the syntax and it seems to be right, you'll likely need to use sudo to use them.

Resources