Sponsored Content
Operating Systems Linux Debian Problem with files/dirs deletion Post 302772635 by Don Cragun on Tuesday 26th of February 2013 09:32:42 AM
Old 02-26-2013
Quote:
Originally Posted by pentago
Well yeah, i was told that apache/php runs with my user as a security precaution.

Maybe i din't explained it very well, im not very skilled..
Anyway, from what i understood, such behavior is common practice on shell accounts where multi user environment is in place.

I can't switch to myusername-www, it gives me authentication failure

Code:
% su pentago-www
Password:
su: Authentication failure

Could you please elabore on how do i add myself to group with proper permissions?

Thanks!
If you can't remove files created by the application you're running, it is not running with your user-ID. Go back to the administrator who installed this application for you and tell them that you can't use it because it is creating files owned by myusername-www instead of files owned by myusername. They need to either give you the passwords you need to work as myusername-www or they need to make it run as myusername instead of as myusername-www. Other than that, we won't help you break security on the system you're using.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

I need to ls all files in 4-6 deep dirs

I need to print to file , a listing of all files below a certain directory. Example: I need to print to file a listing of all files below the etc dir (including the subdirectories) with their full path. Any ideas on how to do this with one command. Or is this something I need to do on all... (4 Replies)
Discussion started by: gforty
4 Replies

2. UNIX for Dummies Questions & Answers

file deletion problem

I am using unix via telnet ssh and i have a problem I was testing the server. I made a directory. Transfered a file from an ftp to it. Opened the file with the vi text editor --This where my problem came..... I tried deleting the file using rm somefile.htm when is typed ls i noticed that... (2 Replies)
Discussion started by: shdwsclan
2 Replies

3. Filesystems, Disks and Memory

fifo deletion problem..

I have unix sco server. I have created one application for client server communication. On this I have creted some fifos/pipes. The reader.123 fifo is used by one process for reading and writing. I haven't deleted that fifo. But ls or find command doesn't show it. It is giving error as file or... (1 Reply)
Discussion started by: yogeshdimble
1 Replies

4. Shell Programming and Scripting

script find files in two dirs HELP

I have a directory which is /home/mark/files/ , inside this particular I have a bunch of filles (see examples below) TST_SHU_00014460_20090302.txt TST_SHU_00016047_20090302.txt TST_SHU_00007838_20090303.txt TST_SHU_00056485_20090303.txt TST_SHU_00014460_20090303.txt... (2 Replies)
Discussion started by: fierusbentus
2 Replies

5. Shell Programming and Scripting

Find most recent files in dirs and tar them up?

Hey all.. This should be simple but stoopid here can't get head around it! I have many directories, say 100 each with many files inside. I need a script to traverse through the dirs, find most recent file in each dir and add it to a tar file. I can find the files with something like for... (1 Reply)
Discussion started by: bobdung
1 Replies

6. Shell Programming and Scripting

Have absolute path for files in different dirs

Hi everybody. I need a command to print the absolute path of files which name starts always with a pattern (MOD03), independently on where they are in the filesystem. I have tryedls -ld ${INPUTPREFIX}/*/*/* | grep MOD03 | awk '{ print $8 }'but I have to use "/*/*/*" in this case to have the... (5 Replies)
Discussion started by: canduc17
5 Replies

7. Shell Programming and Scripting

sort retrieved data files in different dirs

Hi, I have a script to retrieve data files from server and store them in a directory on local disk. The script runs everyday as cron job. But now those files are too many so my boss wants me to put the files into different directories base on dates. Those files look like this: ... (4 Replies)
Discussion started by: leafei
4 Replies

8. Shell Programming and Scripting

AWK help print dirs with files in it

Hi, I'm writing some start of day checks for my work. I want to check some dirs for files that have been created longer than 10 mins ago and not been transfered. I've already used a find command to write a list of files that meet this criteria to a log called sod.log i.e. ... (1 Reply)
Discussion started by: elcounto
1 Replies

9. Shell Programming and Scripting

Moving files into dirs corresponding to dates

I am trying to find a way to move files into corresponding date files. i=0 while read line do array="$line" (( i++ )) done < <(ls) cd $(echo ${array}) echo ${array}} pwd #cd "$(array}" ] || mkdir 2015 cd "2015" ] || mkdir 02-February ] || mkdir 03-March ] || mkdir... (10 Replies)
Discussion started by: newbie2010
10 Replies

10. Shell Programming and Scripting

Replace a string in files in all dir and sub dirs

Hello, I need to replace xml version='1.1' with xml version='1.0' in all xml files under /app/jenkins/ in all dir and sub dirs in my CentOS VM, I tried below command but it didn't help, looks like I'm missing a character somewhere. grep -rl "xml version='1.1'" . | xargs sed -i 's/"xml... (2 Replies)
Discussion started by: mahesh Madpathi
2 Replies
Catalyst::Authentication::Realm::SimpleDB(3pm)		User Contributed Perl Documentation	    Catalyst::Authentication::Realm::SimpleDB(3pm)

NAME
Catalyst::Authentication::Realm::SimpleDB - A simplified Catalyst authentication configurator. SYNOPSIS
use Catalyst qw/ Authentication /; __PACKAGE__->config->{'Plugin::Authentication'} = { default => { class => 'SimpleDB', user_model => 'MyApp::Schema::Users', } } # later on ... $c->authenticate({ username => 'myusername', password => 'mypassword' }); my $age = $c->user->get('age'); $c->logout; DESCRIPTION
The Catalyst::Authentication::Realm::SimpleDB provides a simple way to configure Catalyst Authentication when using the most common configuration of a password protected user retrieved from an SQL database. CONFIGURATION
The SimpleDB Realm class configures the Catalyst authentication system based on the following: o Your user data is stored in a table that is accessible via $c->model($cfg->{user_model}); o Your passwords are stored in the 'password' field in your users table and are not encrypted. o Your roles for users are stored in a separate table and are directly accessible via a DBIx::Class relationship called 'roles' and the text of the role is stored in a field called 'role' within the role table. o Your user information is stored in the session once the user is authenticated. For the above usage, only one configuration option is necessary, 'user_model'. user_model should contain the class name of your user class. See the "PREPARATION" section for info on how to set up your database for use with this module. If your system differs from the above, some minor configuration may be necessary. The options available are detailed below. These options match the configuration options used by the underlying credential and store modules. More information on these options can be found in Catalyst::Authentication::Credential::Password and Catalyst::Authentication::Store::DBIx::Class. user_model Contains the class name (as passed to $c->model() ) of the DBIx::Class schema to use as the source for user information. This config item is REQUIRED. password_field If your password field is not 'password' set this option to the name of your password field. Note that if you change this to, say 'users_password' you will need to use that in the authenticate call: $c->authenticate({ username => 'bob', users_password => 'foo' }); password_type If the password is not stored in plaintext you will need to define what format the password is in. The common options are crypted and hashed. Crypted uses the standard unix crypt to encrypt the password. Hashed uses the Digest modules to perform password hashing. password_hash_type If you use a hashed password type - this defines the type of hashing. See Catalyst::Authentication::Credential::Password for more details on this setting. role_column If your users roles are stored directly in your user table, set this to the column name that contains your roles. For example, if your user table contains a field called 'permissions', the value of role_column would be 'permissions'. NOTE: If multiple values are stored in the role column, they should be space or pipe delimited. role_relation and role_field These define an alternate role relationship name and the column that holds the role's name in plain text. See "CONFIGURATION" in Catalyst::Authentication::Store::DBIx::Class for more details on these settings. use_userdata_from_session This is a simple 1 / 0 setting which determines how a user's data is saved / restored from the session. If it is set to 1, the user's complete information (at the time of authentication) is cached between requests. If it is set to 0, the users information is loaded from the database on each request. PREPARATION
This module makes several assumptions about the structure of your database. Below is an example of a table structure which will function with this module in it's default configuration. You can use this table structure as-is or add additional fields as necessary. NOTE that this is the default SimpleDB configuration only. Your table structure can differ significantly from this when using the DBIx::Class Store directly. -- -- note that you can add any additional columns you require to the users table. -- CREATE TABLE users ( id INTEGER PRIMARY KEY, username TEXT, password TEXT, ); CREATE TABLE roles ( id INTEGER PRIMARY KEY, role TEXT ); CREATE TABLE user_roles ( user_id INTEGER, role_id INTEGER, PRIMARY KEY (user_id, role_id) ); Also, after you have loaded this table structure into your DBIx::Class schema, please be sure that you have a many_to_many DBIx::Class relationship defined for the users to roles relation. Your schema files should contain something along these lines: "lib/MyApp/Schema/Users.pm": __PACKAGE__->has_many(map_user_role => 'MyApp::Schema::UserRoles', 'user_id'); __PACKAGE__->many_to_many(roles => 'map_user_role', 'role'); "lib/MyApp/Schema/UserRoles.pm": __PACKAGE__->belongs_to(role => 'MyApp::Schema::Roles', 'role_id'); MIGRATION
If and when your application becomes complex enough that you need more features than SimpleDB gives you access to, you can migrate to a standard Catalyst Authentication configuration fairly easily. SimpleDB simply creates a standard Auth config based on the inputs you give it. The config SimpleDB creates by default looks like this: MyApp->config('Plugin::Authentication') = { default => { credential => { class => 'Password', password_type => 'clear' }, store => { class => 'DBIx::Class', role_relation => 'roles', role_field => 'role', use_userdata_from_session => '1', user_model => $user_model_from_simpledb_config } } }; SEE ALSO
This module relies on a number of other modules to do it's job. For more information you can refer to the following: o Catalyst::Manual::Tutorial::Authentication o Catalyst::Plugin::Authentication o Catalyst::Authentication::Credential::Password o Catalyst::Authentication::Store::DBIx::Class o Catalyst::Plugin::Authorization::Roles perl v5.14.2 2011-08-23 Catalyst::Authentication::Realm::SimpleDB(3pm)
All times are GMT -4. The time now is 01:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy