0

I'm having trouble with my website/application setting strange Group names to new files.

Whenever I create a new file from my website (a log file, txt file, anything) it sets the User as webapp (correctly), but the Group name as 4294967295

If I use terminal to ssh into my instance and try to get some data on that user it doesn't return anything. For example,

$ sudo groups 4294967295
groups: 4294967295: No such user

Further, I can't add this mystery group to any of my other users.

This is making things difficult because I have to run my cron jobs as a different user and I would like to let them both write to the same log (so they both must share a group).

I recognize that it's strange (and maybe meaningful) that 4294967295 is the highest number one can reach with 32 bits.

Any ideas or suggestions? I don't have an extensive linux background and haven't had much luck searching for answers.

I'm using Amazon AWS and an ec2-instance.

Thanks.

Additional Info:

How'd I get that group name?

ls -l
-rwxrwxr-x 1 webapp 4294967295  8347 Apr 16 17:35 log_2013-04-16.txt

groups 4294967295
groups: 4294967295: No such user

Additional Info #2:

$ file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID[sha1]=0x083f0a5a25fb311dae23412bcc79f384a865e7d4, stripped

$ groups webapp
webapp : webapp ec2-user

Additional Info #3:

$ cat group
root:x:0:
bin:x:1:bin,daemon
daemon:x:2:bin,daemon
sys:x:3:bin,adm
adm:x:4:adm,daemon
tty:x:5:
disk:x:6:
lp:x:7:daemon
mem:x:8:
kmem:x:9:
wheel:x:10:ec2-user
mail:x:12:mail
uucp:x:14:
man:x:15:
games:x:20:
gopher:x:30:
video:x:39:
dip:x:40:
ftp:x:50:
lock:x:54:
audio:x:63:
nobody:x:99:
users:x:100:
utmp:x:22:
utempter:x:35:
cdrom:x:11:
tape:x:33:
dialout:x:18:
floppy:x:19:
ec2-user:x:500:webapp
saslauth:x:76:
mailnull:x:47:
smmsp:x:51:
ssh_keys:x:499:
ntp:x:38:
sshd:x:74:
tcpdump:x:72:
screen:x:84:
dbus:x:81:
webapp:x:501:ec2-user
apache:x:48:
4

1 回答 1

0

首先,您groups以错误的方式使用 cmd。像这样使用它:

groups webapp_user

它会给你 webapp_user 所属的组。


我预计组名设置为 2^32 是一个显示问题,或者您以错误的方式检索组名。你能解释一下你是如何得到 2^32 的吗?有源代码吗?

于 2013-04-18T19:26:07.860 回答