0

I just got onto a new project with the student government at my University and we're trying to get our webserver into a more workable state. The current problem is that all of us for some reason have sudo power on the server, but we can't write/create files anywhere on the server (as far as we can tell) currently. Our groups are currently as follows:

/srv/ice/db$ groups goshri sshamim rmenezes
goshri : goshri
sshamim : sshamim ptx
rmenezes : rmenezes ptx
daifotis : daifotis ptx

We added a few of us to ptx because we thought that might give us write access but it didn't. We have a bunch of webapps running on this server but since it's university things change hands quickly. What can we do to give us read access?

1
  • please post the error messages you get when trying to create a file and the directory permissions. also send the output of 'id'.
    – anon
    Mar 7, 2011 at 1:35

3 Answers 3

0

think the problem is broader than this. I mean we literally have no write access ANYWHERE on the server

OK, as it stands it sounds ike the system is pretty much unusable. You could spend some time trying to work out why - and reverting this, but it probably makes a lot more sense to just start again. There are two very important things you need to do:

1) workout how to get any content currently available on the server of it - if you can't write a local tarball, can you mount an NFS drive and write to that? Alternatively use rsync to mirror the website on the replacement.

2) plan out a proper configuration for the new server and DOCUMENT it.

But efore you do that, have a look at the mount options for the filesystems and the attribute settings on the files.

HTH

C.

1

If you have sudo power, try running sudo su to become root (enabling you to do anything). Of course, this isn't the best way to use your sudo permission. If you are all a part of the group "ptx" then you could grant read/write access for the group with "chmod".

The way permissions work is that 3 "types" of permissions are associated with a number for each type of user - owner, group, or all (users).

The permission types are read, write, and execute. With chmod, each "type" of user has up to 7 options (0 being representative of absolutely NO permissions and 7 being representative of having all permissions).

Since you're part of the group, you could give the group read/write permissions to the files in question with: "chmod 760" which equals "owner get all permissions, group gets read/write permissions, and everyone else gets no permissions."

Here's a good resource on File Permissions: Understanding Linux File Permissions The main point on this article is that for each type of user, read permissions (r) = 4 write permissions (w) w = 2 execute permissions (x) = 1

If you were to give owner write and execute permissions but not read permissions, and give everyone else NO permissions, it would be "sudo chmod 300 filename".

Does this start to make sense?

Good luck,

David

2
  • I think the problem is broader than this. I mean we literally have no write access ANYWHERE on the server, even in our own home directories. It's extremely bizarre.
    – themaestro
    Mar 6, 2011 at 19:37
  • But you have sudo power, right? Sudo into the root user with "sudo su -" and then you'll have super user powers, regardless. Or am I STILL missing something? I just started to suggest checking to see how the partition is mounted, but noticed @ztron's answer above... we must have cross-posted earlier.
    – David W
    Mar 7, 2011 at 12:21
0

Check how the root partition is mounted. I suspect something went wrong with the filesystem and it got remounted in a read-only mode. Simply type `mount' as root and look at the flag listed in ()s. It should say (rw). If it says (ro), then my assumption is correct and the server is having a problem with the filesystem.

You must log in to answer this question.

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