Showing posts with label Permission. Show all posts
Showing posts with label Permission. Show all posts

Thursday, 12 February 2015

[xubuntu] Folder permission for multiple users topic






I live in a living community and I have setup a local machine (Ubuntu Server 14.04) with the purpose to serve media files over Plex to my devices.

Now my friends would like to also use Plex because they like it very much and want to contribute new media files.

This means that they have to get access to my Media folder. The problem is that all new created folders containing new media stuff still have the specific user as owner so that another user can't complete the TV shows etc. of another user.

What I did:


  1. Created 4 new users accounts (one for each community member)
  2. Created a new group "mediamember"
  3. Added all new user accounts to the group "mediamember" inlcuding the user plex and my account
  4. Changed the groupowner of my Media folder to the new group "mediamember". I did it recursive so all the subfolders would get the new groupowner.



And this scenario does not work (more detailed):

One of the new users wants to add a new TV Show:

1) One of the new users logs in via remote desktop (xubuntu-desktop over x2go)

2) He opens a folder on his desktop which is a symbolic link to my "Media" folder

3) There he is going to the "TV Shows" folder

4) There he creates a new folder with the name "Name of a tv show"

5) He goes into the new folder and creates a new folder called "Season 1"

6) He uploads *.mkv files which does NOT cover all episodes of "Season 1"

7) Other user wants to complete the episodes but he can't create new episodes because he has no rights.

Like I allready mentioned I think it has something to do with the problem that every new created folder and file still have the user specific group and rights.

I would like to have all new created folders and files with the group "mediammeber" as owner so that everybody has the rights to contribute and organise the media files.

Google says it might have to do something with umask. However I did not understand the concept of umask.

Can anybody help?

Thank you very much!






Friday, 6 February 2015

[ubuntu] file permission s flag topic






hi, i'm currently reading 'Hacking, the art of exploitation' and try to reproduce some of the examples there. One example would be to change the file permissions seeting the s flag on file, so it can be executed by any user as if it would be the file owner. what i'm doing is the following...


Quote:





[kbear@HECHTNY]:~/Dev\> ls -la uidcheck
-rwxr-xr-x 1 kbear kbear 8621 Feb 6 15:42 uidcheck
[kbear@HECHTNY]:~/Dev\> ./uidcheck
real uid: 1000
effective uid: 1000
[kbear@HECHTNY]:~/Dev\> sudo chown root:root uidcheck
[kbear@HECHTNY]:~/Dev\> ls -la uidcheck
-rwxr-xr-x 1 root root 8621 Feb 6 15:42 uidcheck
[kbear@HECHTNY]:~/Dev\> sudo chmod u+s uidcheck
[kbear@HECHTNY]:~/Dev\> ls -la uidcheck
-rwsr-xr-x 1 root root 8621 Feb 6 15:42 uidcheck
[kbear@HECHTNY]:~/Dev\> ./uidcheck
real uid: 1000
effective uid: 1000
[kbear@HECHTNY]:~/Dev\>





the uidcheck file is a simple program that prints the userid as well as the effective userid (using getuid(), geteuid() respectively, see code below). after changing the owner to root and changing the file permission w/ the s flag i would expect the ids to be different and not the same. i did the same thing on the live-cd provided w/ the book and there it seems to work all fine.

Am i missing something or is this a security feature preventing this kind of change of file permissions.

thanks for the help

regards



Code:


#include <stdio.h>

int main(){
    printf("real uid: %d\n",getuid());
    printf("effective uid: %d\n",geteuid());
}








Thursday, 5 February 2015

Permission denied error when installing MATLAB topic






Hi

I am trying to install a student version of MATLAB and Simulink on xubuntu from a CD-ROM.

I don't have a CD drive in my computer, so I've copied the files across to my desktop.

I am getting the following error when trying to run the install script:

john@ASUS-red:~/Desktop/MATLAB$ ls
autorun.inf InstallForMacOSX.app install_unix.sh setup.exe unix win32
john@ASUS-red:~/Desktop/MATLAB$ sudo ./install_unix.sh
[sudo] password for john:
./install_unix.sh: 4: exec: ./unix/install: Permission denied

I have ticked 'Allow this file to run as a program' in the Permissions properties tab.

Here's what's in the install_unix.sh file:

#! /bin/sh
dirs=`dirname `
args=$@
exec $dirs/unix/install -nocp $args